update nvim

This commit is contained in:
ksyasuda 2022-02-14 17:41:21 -08:00
parent c5c8a5e1e3
commit d8901b7d0e
4 changed files with 25 additions and 4 deletions

View File

@ -226,9 +226,11 @@ endif
set t_Co=256 set t_Co=256
if has('nvim') if has('nvim')
set termguicolors set termguicolors
" colorscheme doom-one colorscheme doom-one
" colorscheme dracula " colorscheme dracula
colorscheme github_dark " colorscheme github_dark
" colorscheme onedark
" colorscheme onedarkpro
else else
" let g:onedark_termcolors=256 "enable 256 colors " let g:onedark_termcolors=256 "enable 256 colors
" colorscheme onedark "set colorsheme as onedark " colorscheme onedark "set colorsheme as onedark

View File

@ -82,6 +82,7 @@ nmap <leader>ld :lua vim.lsp.buf.declaration()<CR>
nmap <leader>lh :lua vim.lsp.buf.signature_help()<CR> nmap <leader>lh :lua vim.lsp.buf.signature_help()<CR>
nmap <leader>li :lua vim.lsp.buf.implementation()<CR> nmap <leader>li :lua vim.lsp.buf.implementation()<CR>
nmap <leader>lr :lua vim.lsp.buf.references()<CR> nmap <leader>lr :lua vim.lsp.buf.references()<CR>
nmap <leader>lR :lua vim.lsp.buf.rename()<CR>
nmap <leader>ls :lua vim.lsp.buf.document_symbol()<CR> nmap <leader>ls :lua vim.lsp.buf.document_symbol()<CR>
nmap <leader>lt :lua vim.lsp.buf.type_definition()<CR> nmap <leader>lt :lua vim.lsp.buf.type_definition()<CR>
nmap <leader>lw :lua vim.lsp.buf.workspace_symbol()<CR> nmap <leader>lw :lua vim.lsp.buf.workspace_symbol()<CR>

View File

@ -124,7 +124,7 @@ local DEFAULT_SETTINGS = {
vim.diagnostic.config({ vim.diagnostic.config({
virtual_text = true, virtual_text = true,
signs = true, signs = true,
underline = true, underline = false,
update_in_insert = false, update_in_insert = false,
severity_sort = true, severity_sort = true,
}) })

View File

@ -14,15 +14,33 @@ require("null-ls").setup({
end, end,
sources = { sources = {
require("null-ls").builtins.completion.spell, 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.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({ require("null-ls").builtins.formatting.shfmt.with({
filetypes = {"sh", "bash"}, filetypes = {"sh", "bash"},
extra_args = { "-i", "4", "-ci", "-sr" } extra_args = { "-i", "4", "-ci", "-sr" }
}), }),
require("null-ls").builtins.code_actions.shellcheck,
require("null-ls").builtins.diagnostics.shellcheck.with({ 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" } 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,
}, },
}) })