From d8901b7d0e843d5f3b3c13ad951ecd1b4fa19933 Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Mon, 14 Feb 2022 17:41:21 -0800 Subject: [PATCH] update nvim --- nvim/init.vim | 6 ++++-- nvim/keybindings.vim | 1 + nvim/plugin-confs/lspconfig.lua | 2 +- nvim/plugin-confs/null-ls.lua | 20 +++++++++++++++++++- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/nvim/init.vim b/nvim/init.vim index 66037df..de252f7 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -226,9 +226,11 @@ endif set t_Co=256 if has('nvim') set termguicolors - " colorscheme doom-one + colorscheme doom-one " colorscheme dracula - colorscheme github_dark + " colorscheme github_dark + " colorscheme onedark + " colorscheme onedarkpro else " let g:onedark_termcolors=256 "enable 256 colors " colorscheme onedark "set colorsheme as onedark diff --git a/nvim/keybindings.vim b/nvim/keybindings.vim index 67f3486..913f6f7 100644 --- a/nvim/keybindings.vim +++ b/nvim/keybindings.vim @@ -82,6 +82,7 @@ nmap ld :lua vim.lsp.buf.declaration() nmap lh :lua vim.lsp.buf.signature_help() nmap li :lua vim.lsp.buf.implementation() nmap lr :lua vim.lsp.buf.references() +nmap lR :lua vim.lsp.buf.rename() nmap ls :lua vim.lsp.buf.document_symbol() nmap lt :lua vim.lsp.buf.type_definition() nmap lw :lua vim.lsp.buf.workspace_symbol() diff --git a/nvim/plugin-confs/lspconfig.lua b/nvim/plugin-confs/lspconfig.lua index d3fa6e6..fd45c82 100644 --- a/nvim/plugin-confs/lspconfig.lua +++ b/nvim/plugin-confs/lspconfig.lua @@ -124,7 +124,7 @@ local DEFAULT_SETTINGS = { vim.diagnostic.config({ virtual_text = true, signs = true, - underline = true, + underline = false, update_in_insert = false, severity_sort = true, }) diff --git a/nvim/plugin-confs/null-ls.lua b/nvim/plugin-confs/null-ls.lua index f88849f..d2d1209 100644 --- a/nvim/plugin-confs/null-ls.lua +++ b/nvim/plugin-confs/null-ls.lua @@ -14,15 +14,33 @@ require("null-ls").setup({ end, sources = { require("null-ls").builtins.completion.spell, + require("null-ls").builtins.completion.luasnip, require("null-ls").builtins.code_actions.gitsigns, + require("null-ls").builtins.code_actions.shellcheck, + require("null-ls").builtins.diagnostics.cppcheck, + require("null-ls").builtins.diagnostics.gitlint, + require("null-ls").builtins.diagnostics.jsonlint, + require("null-ls").builtins.diagnostics.luacheck, + require("null-ls").builtins.diagnostics.markdownlint, + require("null-ls").builtins.diagnostics.pylint, + require("null-ls").builtins.diagnostics.pydocstyle.with({ + extra_args = { "--config=$ROOT/setup.cfg" } + }), + require("null-ls").builtins.diagnostics.vint, + require("null-ls").builtins.formatting.json_tool, + require("null-ls").builtins.formatting.lua_format, + require("null-ls").builtins.formatting.markdownlint, + require("null-ls").builtins.formatting.prettier, + require("null-ls").builtins.formatting.rustfmt, require("null-ls").builtins.formatting.shfmt.with({ filetypes = {"sh", "bash"}, extra_args = { "-i", "4", "-ci", "-sr" } }), - require("null-ls").builtins.code_actions.shellcheck, require("null-ls").builtins.diagnostics.shellcheck.with({ extra_args = { "--format", "json1", "--source-path=$DIRNAME", "--external-sources", "-", "-s", "bash", "-o", "check-extra-masked-returns, check-set-e-suppressed, check-unassigned-uppercase, deprecate-which, quote-safe-variables" } }), + require("null-ls").builtins.formatting.black, + require("null-ls").builtins.formatting.isort, }, })