nvim: refactor part 2
This commit is contained in:
parent
6945941009
commit
706595eaa9
7 changed files with 12 additions and 8 deletions
|
@ -283,8 +283,8 @@ local function undefined_mappings()
|
|||
api.nvim_set_keymap('v', '<', '<gv', opts)
|
||||
api.nvim_set_keymap('v', '>', '>gv', opts)
|
||||
-- Also move up/down virtual lines (:set wrap)
|
||||
api.nvim_set_keymap('n', 'j', 'gj', opts)
|
||||
api.nvim_set_keymap('n', 'k', 'gk', opts)
|
||||
api.nvim_set_keymap('n', 'j', 'v:count == 0 ? "gj" : "j"', {noremap = true, expr = true, silent = true})
|
||||
api.nvim_set_keymap('n', 'k', 'v:count == 0 ? "gk" : "k"', {noremap = true, expr = true, silent = true})
|
||||
-- winshift.nvim
|
||||
api.nvim_set_keymap('n', '<C-w><C-m>', ':WinShift<CR>', opts)
|
||||
api.nvim_set_keymap('n', '<C-w>m', ':WinShift<CR>', opts)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
local fn, cmd = vim.fn, vim.api.nvim_command
|
||||
|
||||
-- Require since we use 'packer' as opt
|
||||
cmd('packadd packer.nvim')
|
||||
vim.api.nvim_exec('packadd packer.nvim', false) -- using vim.api.nvim_command() here fails the whole script on initial setup (since it's an ex command)
|
||||
local present, packer = pcall(require, 'packer')
|
||||
|
||||
if not present then
|
||||
|
|
|
@ -61,11 +61,11 @@ function M.saga()
|
|||
end
|
||||
|
||||
function M.lsp()
|
||||
require('modules.lsp.lsp_conf')
|
||||
require('modules.lsp.lspconfig')
|
||||
end
|
||||
|
||||
function M.null_ls()
|
||||
require('modules.lsp.null_ls_conf')
|
||||
require('modules.lsp.null_ls')
|
||||
end
|
||||
|
||||
function M.sqls()
|
||||
|
|
|
@ -29,13 +29,15 @@ function M.load_plugins()
|
|||
-- This is recommended when using `luafile <afile>` a lot
|
||||
packer.reset()
|
||||
|
||||
-- Configure plugins
|
||||
packer.startup(function(use)
|
||||
for _, repo in ipairs(repos) do
|
||||
use(repo)
|
||||
end
|
||||
-- Install plugins if missing
|
||||
packer.install()
|
||||
end)
|
||||
|
||||
-- Install plugins if missing
|
||||
packer.install()
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
@ -69,7 +69,7 @@ function M.load_options()
|
|||
-- opt.laststatus = 2
|
||||
-- opt.textwidth = 80
|
||||
opt.synmaxcol = 2500
|
||||
-- opt.shell = 'bash'
|
||||
opt.shell = 'bash'
|
||||
opt.grepformat = '%f:%l:%c:%m'
|
||||
opt.grepprg = 'rg --hidden --vimgrep --smart-case --'
|
||||
opt.diffopt = 'filler,iwhite,internal,algorithm:patience'
|
||||
|
@ -103,6 +103,7 @@ function M.load_options()
|
|||
opt.ttimeoutlen = 25
|
||||
opt.updatetime = 150
|
||||
opt.redrawtime = 1500
|
||||
opt.lazyredraw = true
|
||||
|
||||
-- No swapfile
|
||||
opt.backup = false
|
||||
|
@ -141,6 +142,7 @@ function M.load_options()
|
|||
opt.smartindent = true
|
||||
-- opt.autoindent = true
|
||||
opt.shiftround = true
|
||||
opt.breakindent = true
|
||||
|
||||
-- Trailings, line break
|
||||
opt.list = true
|
||||
|
|
Loading…
Reference in a new issue