update
This commit is contained in:
@@ -1,4 +1,56 @@
|
|||||||
require("nvchad.configs.lspconfig").defaults()
|
local nvlsp = require "nvchad.configs.lspconfig"
|
||||||
|
local lspconfig = require "lspconfig"
|
||||||
|
|
||||||
|
nvlsp.defaults() -- loads nvchad's defaults
|
||||||
|
|
||||||
|
local servers = { "html", "cssls", "clangd" }
|
||||||
|
|
||||||
|
-- lsps with default config
|
||||||
|
for _, lsp in ipairs(servers) do
|
||||||
|
lspconfig[lsp].setup {
|
||||||
|
on_attach = nvlsp.on_attach,
|
||||||
|
on_init = nvlsp.on_init,
|
||||||
|
capabilities = nvlsp.capabilities,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
lspconfig.basedpyright.setup {
|
||||||
|
on_attach = nvlsp.on_attach,
|
||||||
|
-- on_init = nvlsp.on_init,
|
||||||
|
capabilities = nvlsp.capabilities,
|
||||||
|
settings = {
|
||||||
|
pyright = {
|
||||||
|
disableOrganizeImports = true,
|
||||||
|
},
|
||||||
|
python = {
|
||||||
|
analysis = {
|
||||||
|
ignore = { '*' }
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
lspconfig.ruff.setup {
|
||||||
|
on_attach = nvlsp.on_attach,
|
||||||
|
-- on_init = nvlsp.on_init,
|
||||||
|
capabilities = nvlsp.capabilities,
|
||||||
|
settings = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
lspconfig.rust_analyzer.setup {
|
||||||
|
on_attach = nvlsp.on_attach,
|
||||||
|
-- on_init = nvlsp.on_init,
|
||||||
|
capabilities = nvlsp.capabilities,
|
||||||
|
settings = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
lspconfig.bashls.setup {
|
||||||
|
on_attach = nvlsp.on_attach,
|
||||||
|
-- on_init = nvlsp.on_init,
|
||||||
|
capabilities = nvlsp.capabilities,
|
||||||
|
settings = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
local servers = { "html", "cssls" }
|
|
||||||
vim.lsp.enable(servers)
|
|
||||||
|
|||||||
@@ -8,3 +8,9 @@ map("n", ";", ":", { desc = "CMD enter command mode" })
|
|||||||
map("i", "jk", "<ESC>")
|
map("i", "jk", "<ESC>")
|
||||||
|
|
||||||
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
|
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
|
||||||
|
|
||||||
|
-- custom
|
||||||
|
map("n", "<leader>ss", ":lua vim.diagnostic.open_float(nil,{focus=false}) <cr>")
|
||||||
|
map("n", "<leader>sd", ":lua vim.diagnostic.setqflist() <cr>")
|
||||||
|
|
||||||
|
-- vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
|
||||||
|
|||||||
@@ -2,5 +2,9 @@ require "nvchad.options"
|
|||||||
|
|
||||||
-- add yours here!
|
-- add yours here!
|
||||||
|
|
||||||
|
-- Show line diagnostics automatically in hover window
|
||||||
|
-- vim.o.updatetime = 250
|
||||||
|
-- vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
|
||||||
|
|
||||||
-- local o = vim.o
|
-- local o = vim.o
|
||||||
-- o.cursorlineopt ='both' -- to enable cursorline!
|
-- o.cursorlineopt ='both' -- to enable cursorline!
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ return {
|
|||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"vim", "lua", "vimdoc",
|
"vim", "lua", "vimdoc",
|
||||||
"html", "css"
|
"html", "css", "python",
|
||||||
|
"rust",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user