✨ personal changes
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
local options = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
-- css = { "prettier" },
|
||||
-- html = { "prettier" },
|
||||
python = { "black" },
|
||||
css = { "prettier" },
|
||||
html = { "prettier" },
|
||||
},
|
||||
|
||||
-- format_on_save = {
|
||||
|
||||
@@ -21,3 +21,32 @@ lspconfig.tsserver.setup {
|
||||
on_init = on_init,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
-- python
|
||||
lspconfig.basedpyright.setup{
|
||||
on_attach = on_attach,
|
||||
on_init = on_init,
|
||||
capabilities = capabilities,
|
||||
filetypes = { "python" },
|
||||
settings = {
|
||||
basedpyright = {
|
||||
typeCheckingMode = "standard",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
---- ruff_lsp and pyright compatibility
|
||||
local on_attach = function(client, bufnr)
|
||||
if client.name == 'ruff_lsp' then
|
||||
-- hover in favor of Pyright
|
||||
client.server_capabilities.hoverProvider = false
|
||||
end
|
||||
end
|
||||
|
||||
lspconfig.ruff_lsp.setup{
|
||||
on_attach = on_attach,
|
||||
on_init = on_init,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user