diff options
Diffstat (limited to 'lua/pml68')
| -rw-r--r-- | lua/pml68/configs/cmp.lua | 14 | ||||
| -rw-r--r-- | lua/pml68/configs/settings/elixirls.lua | 2 | ||||
| -rwxr-xr-x | lua/pml68/configs/settings/rust_analyzer.lua | 2 | ||||
| -rw-r--r-- | lua/pml68/configs/toggleterm.lua | 8 | ||||
| -rw-r--r-- | lua/pml68/plugins.lua | 48 | ||||
| -rw-r--r-- | lua/pml68/remap.lua | 6 |
6 files changed, 40 insertions, 40 deletions
diff --git a/lua/pml68/configs/cmp.lua b/lua/pml68/configs/cmp.lua index 91d1b5e..bffb09a 100644 --- a/lua/pml68/configs/cmp.lua +++ b/lua/pml68/configs/cmp.lua @@ -2,10 +2,10 @@ local cmp = require("cmp") cmp.setup({ sources = { - {name = 'nvim_lsp'}, - {name = 'path'}, - {name = 'vimtex'}, - {name = 'crates'}, + { name = 'nvim_lsp' }, + { name = 'path' }, + { name = 'vimtex' }, + { name = 'crates' }, }, window = { completion = { @@ -18,9 +18,9 @@ cmp.setup({ completeopt = 'menu,menuone,noinsert' }, mapping = cmp.mapping.preset.insert({ - ['<CR>'] = cmp.mapping.confirm({select = true}), - ['<S-Tab>'] = cmp.mapping.select_prev_item({behavior = 'select'}), - ['<Tab>'] = cmp.mapping.select_next_item({behavior = 'select'}), + ['<CR>'] = cmp.mapping.confirm({ select = true }), + ['<S-Tab>'] = cmp.mapping.select_prev_item({ behavior = 'select' }), + ['<Tab>'] = cmp.mapping.select_next_item({ behavior = 'select' }), }), snippet = { expand = function(args) diff --git a/lua/pml68/configs/settings/elixirls.lua b/lua/pml68/configs/settings/elixirls.lua index c724eea..721ef5e 100644 --- a/lua/pml68/configs/settings/elixirls.lua +++ b/lua/pml68/configs/settings/elixirls.lua @@ -1,3 +1,3 @@ return { - cmd = {vim.fn.stdpath("data") .. "/mason/bin/elixir-ls"}, + cmd = { vim.fn.stdpath("data") .. "/mason/bin/elixir-ls" }, } diff --git a/lua/pml68/configs/settings/rust_analyzer.lua b/lua/pml68/configs/settings/rust_analyzer.lua index e89b07f..3222bb7 100755 --- a/lua/pml68/configs/settings/rust_analyzer.lua +++ b/lua/pml68/configs/settings/rust_analyzer.lua @@ -1,5 +1,5 @@ return { - filetypes = {"rust"}, + filetypes = { "rust" }, settings = { ['rust-analyzer'] = { cargo = { diff --git a/lua/pml68/configs/toggleterm.lua b/lua/pml68/configs/toggleterm.lua index 997802b..e2681b5 100644 --- a/lua/pml68/configs/toggleterm.lua +++ b/lua/pml68/configs/toggleterm.lua @@ -1,5 +1,5 @@ -local Terminal = require('toggleterm.terminal').Terminal -local lazygit = Terminal:new({ +local Terminal = require('toggleterm.terminal').Terminal +local lazygit = Terminal:new({ cmd = "lazygit", hidden = true, direction = "float", @@ -12,9 +12,9 @@ function _lazygit_toggle() lazygit:toggle() end -vim.keymap.set("n", "<leader>g", "<cmd> lua _lazygit_toggle() <CR>", {noremap = true, silent = true}) +vim.keymap.set("n", "<leader>g", "<cmd> lua _lazygit_toggle() <CR>", { noremap = true, silent = true }) function _G.set_terminal_keymaps() - local opts = {buffer = 0} + local opts = { buffer = 0 } vim.keymap.set('t', '<C-x>', [[<C-\><C-n>]], opts) vim.keymap.set('t', '<C-h>', [[<Cmd>wincmd h<CR>]], opts) vim.keymap.set('t', '<C-j>', [[<Cmd>wincmd j<CR>]], opts) diff --git a/lua/pml68/plugins.lua b/lua/pml68/plugins.lua index aa839e5..4c206a9 100644 --- a/lua/pml68/plugins.lua +++ b/lua/pml68/plugins.lua @@ -8,7 +8,7 @@ local plugins = { vim.defer_fn(function() require("colorizer").attach_to_buffer(0) - end,0) + end, 0) end }, --IndentBlankline @@ -32,13 +32,13 @@ local plugins = { "windwp/nvim-autopairs", opts = { fast_wrap = {}, - disable_filetype = {"TelescopePrompt","vim"}, + disable_filetype = { "TelescopePrompt", "vim" }, }, - config = function(_,opts) + config = function(_, opts) require("nvim-autopairs").setup(opts) - local cmp_autopairs = require"nvim-autopairs.completion.cmp" - require("cmp").event:on("confirm_done",cmp_autopairs.on_confirm_done()) + local cmp_autopairs = require "nvim-autopairs.completion.cmp" + require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done()) end, }, "hrsh7th/cmp-nvim-lsp", @@ -63,7 +63,7 @@ local plugins = { end end, }, - config = function(_,opts) + config = function(_, opts) require("pml68.configs.toggleterm") require("toggleterm").setup(opts) end @@ -83,26 +83,26 @@ local plugins = { event = "BufReadPre", opts = { signs = { - add = {text = "│"}, - change = {text = "│"}, - delete = {text = ""}, - topdelete = {text = "‾"}, - changedelete = {text = "~"}, - untracked = {text = "│"}, + add = { text = "│" }, + change = { text = "│" }, + delete = { text = "" }, + topdelete = { text = "‾" }, + changedelete = { text = "~" }, + untracked = { text = "│" }, }, on_attach = function(bufnr) local gs = package.loaded.gitsigns - local function map(mode,l,r,opts) + local function map(mode, l, r, opts) opts = opts or {} opts.buffer = bufnr - vim.keymap.set(mode,l,r,opts) + vim.keymap.set(mode, l, r, opts) end - map("n","<leader>gb",gs.blame_line) + map("n", "<leader>gb", gs.blame_line) end, }, - config = function(_,opts) + config = function(_, opts) require("gitsigns").setup(opts) end }, @@ -115,17 +115,17 @@ local plugins = { }, { "williamboman/mason.nvim", - cmd = {"Mason","MasonInstall","MasonInstallAll","MasonUpdate"}, + cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUpdate" }, opts = function() return require("pml68.configs.mason") end, - config = function(_,opts) + config = function(_, opts) require("mason").setup(opts) - vim.api.nvim_create_user_command("MasonInstallAll",function() + vim.api.nvim_create_user_command("MasonInstallAll", function() if opts.ensure_installed and #opts.ensure_installed > 0 then - vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed," ")) + vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " ")) end - end,{}) + end, {}) vim.g.mason_binaries_list = opts.ensure_installed end, @@ -158,7 +158,7 @@ local plugins = { --Syntaxhighlighting { "nvim-treesitter/nvim-treesitter", - event = {"BufReadPost","BufNewFile"}, + event = { "BufReadPost", "BufNewFile" }, build = ":TSUpdate", config = function() require("nvim-treesitter.configs").setup({ @@ -282,12 +282,12 @@ local plugins = { "saecki/crates.nvim", tag = "stable", dependencies = "hrsh7th/nvim-cmp", - event = {"BufRead Cargo.toml"}, + event = { "BufRead Cargo.toml" }, config = function() local crates = require("crates") crates.setup() - vim.keymap.set("n","<leader>rcu",function() + vim.keymap.set("n", "<leader>rcu", function() crates.upgrade_all_crates() end) end diff --git a/lua/pml68/remap.lua b/lua/pml68/remap.lua index 6d35236..e08f780 100644 --- a/lua/pml68/remap.lua +++ b/lua/pml68/remap.lua @@ -34,7 +34,7 @@ vim.keymap.set('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>') vim.api.nvim_create_autocmd('LspAttach', { desc = 'LSP actions', callback = function(event) - local opts = {buffer = event.buf} + local opts = { buffer = event.buf } vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts) vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts) @@ -44,8 +44,8 @@ vim.api.nvim_create_autocmd('LspAttach', { vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts) vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts) vim.keymap.set('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>', opts) - vim.keymap.set({'n', 'x'}, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts) vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts) + vim.keymap.set({ 'n', 'x' }, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts) end }) @@ -55,7 +55,7 @@ vim.api.nvim_create_autocmd('filetype', { desc = 'Better mappings for netrw', callback = function() local bind = function(lhs, rhs) - vim.keymap.set('n', lhs, rhs, {remap = true, buffer = true}) + vim.keymap.set('n', lhs, rhs, { remap = true, buffer = true }) end bind('a', '%') |
