78 lines
1.4 KiB
Lua
Executable File
78 lines
1.4 KiB
Lua
Executable File
-- Mason setup
|
|
require("mason").setup()
|
|
require("mason-lspconfig").setup({
|
|
ensure_installed = {
|
|
"basedpyright",
|
|
"html",
|
|
"cssls",
|
|
"quick_lint_js",
|
|
"clangd",
|
|
"ts_ls",
|
|
"lua_ls",
|
|
},
|
|
})
|
|
|
|
require("mason-tool-installer").setup({
|
|
ensure_installed = {
|
|
"black",
|
|
"debugpy",
|
|
"flake8",
|
|
"isort",
|
|
"mypy",
|
|
"pylint",
|
|
},
|
|
})
|
|
|
|
-- NvChad LSP defaults
|
|
local nvlsp = require("nvchad.configs.lspconfig")
|
|
|
|
-- Define servers
|
|
local servers = { "html", "cssls", "basedpyright", "quick_lint_js", "qmlls" }
|
|
vim.lsp.enable(servers)
|
|
|
|
-- Use the new Neovim 0.11 LSP config API
|
|
for _, server in ipairs(servers) do
|
|
vim.lsp.config(server, {
|
|
on_attach = nvlsp.on_attach,
|
|
on_init = nvlsp.on_init,
|
|
capabilities = nvlsp.capabilities,
|
|
})
|
|
end
|
|
|
|
vim.lsp.config("lua_ls", {
|
|
settings = {
|
|
Lua = {
|
|
workspace = {
|
|
library = {
|
|
"/usr/share/hypr/stubs",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|
|
|
|
vim.lsp.config("basedpyright", {
|
|
settings = {
|
|
pyright = {
|
|
disableOrganizeImports = true
|
|
},
|
|
basedpyright = {
|
|
analysis = {
|
|
typeCheckingMode = "standard"
|
|
}
|
|
}
|
|
}
|
|
})
|
|
|
|
vim.lsp.config("pyright", {
|
|
on_attach = function(client, bufnr)
|
|
end,
|
|
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
|
},
|
|
|
|
vim.filetype.add({
|
|
extension = {
|
|
log = "log",
|
|
},
|
|
}))
|