more none-ls cleanup and adding LSPs :D
This commit is contained in:
parent
d56f84739b
commit
6d751b38f1
23
init.lua
23
init.lua
|
@ -544,7 +544,7 @@ end, 0)
|
|||
|
||||
-- [[ Configure LSP ]]
|
||||
-- This function gets run when an LSP connects to a particular buffer.
|
||||
local on_attach = function(_, bufnr)
|
||||
local on_attach = function(client, bufnr)
|
||||
-- NOTE: Remember that lua is a real programming language, and as such it is possible
|
||||
-- to define small helper and utility functions so you don't have to repeat yourself
|
||||
-- many times.
|
||||
|
@ -592,6 +592,12 @@ local on_attach = function(_, bufnr)
|
|||
command = 'EslintFixAll',
|
||||
})
|
||||
end
|
||||
|
||||
-- When using pyright and ruff_lsp, disable hover in favor of Pyright
|
||||
if client.name == 'ruff_lsp' then
|
||||
-- Disable hover in favor of Pyright
|
||||
client.server_capabilities.hoverProvider = false
|
||||
end
|
||||
end
|
||||
|
||||
-- document existing key chains
|
||||
|
@ -660,8 +666,19 @@ local servers = {
|
|||
},
|
||||
},
|
||||
bashls = {},
|
||||
ruff_ls = {},
|
||||
pyright = {},
|
||||
ruff_lsp = {},
|
||||
pyright = {
|
||||
pyright = {
|
||||
-- Using Ruff's import organizer
|
||||
disableOrganizeImports = true,
|
||||
},
|
||||
python = {
|
||||
analysis = {
|
||||
-- Ignore all files for analysis to exclusively use Ruff for linting
|
||||
ignore = { '*' },
|
||||
},
|
||||
},
|
||||
},
|
||||
rust_analyzer = {},
|
||||
-- tsserver = {},
|
||||
html = { filetypes = { 'html', 'twig', 'hbs' } },
|
||||
|
|
|
@ -18,7 +18,6 @@ function M.config()
|
|||
sources = {
|
||||
-- Formatters
|
||||
formatting.stylua,
|
||||
formatting.black,
|
||||
formatting.prettier.with({
|
||||
filetypes = {
|
||||
'css',
|
||||
|
|
Loading…
Reference in New Issue