diff --git a/init.lua b/init.lua index babd4c7d..efdcf7f3 100644 --- a/init.lua +++ b/init.lua @@ -102,7 +102,7 @@ vim.g.have_nerd_font = true vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true +vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -605,10 +605,10 @@ require('lazy').setup({ -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { - -- clangd = {}, - -- gopls = {}, - -- pyright = {}, - -- rust_analyzer = {}, + clangd = {}, + gopls = {}, + pyright = {}, + rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: @@ -616,7 +616,6 @@ require('lazy').setup({ -- -- But for many setups, the LSP (`ts_ls`) will work just fine -- ts_ls = {}, - -- lua_ls = { -- cmd = {...}, @@ -699,7 +698,7 @@ require('lazy').setup({ end, formatters_by_ft = { lua = { 'stylua' }, - proto = { 'buf' }, + -- proto = { 'buf' }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, -- @@ -780,9 +779,9 @@ require('lazy').setup({ -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines - --[''] = cmp.mapping.confirm { select = true }, - --[''] = cmp.mapping.select_next_item(), - --[''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.select_prev_item(), -- Manually trigger a completion from nvim-cmp. -- Generally you don't need this, because nvim-cmp will display @@ -956,3 +955,5 @@ require('lazy').setup({ -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et + +require 'custom' diff --git a/lua/custom/init.lua b/lua/custom/init.lua new file mode 100644 index 00000000..704c5843 --- /dev/null +++ b/lua/custom/init.lua @@ -0,0 +1 @@ +require 'custom.remap' diff --git a/lua/custom/remap.lua b/lua/custom/remap.lua new file mode 100644 index 00000000..955d2103 --- /dev/null +++ b/lua/custom/remap.lua @@ -0,0 +1,4 @@ +vim.keymap.set('n', 'pv', vim.cmd.Ex) + +vim.keymap.set('v', 'J', ":m '>+1gv=gv") +vim.keymap.set('v', 'K', ":m '<-2gv=gv")