personal changes

This commit is contained in:
Sakamoto Hiroshi
2024-06-22 13:10:22 -05:00
parent aad624221a
commit 70167bf1c8
6 changed files with 138 additions and 31 deletions
+3 -2
View File
@@ -1,8 +1,9 @@
local options = {
formatters_by_ft = {
lua = { "stylua" },
-- css = { "prettier" },
-- html = { "prettier" },
python = { "black" },
css = { "prettier" },
html = { "prettier" },
},
-- format_on_save = {
+29
View File
@@ -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,
}