Skip to content

Commit

Permalink
feat(nvim): add pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
Diaoul committed Nov 24, 2023
1 parent 1bf2581 commit 574fec4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .config/nvim/lua/diaoul/plugins/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ return {
telemetry = { enable = false },
},
pkgbuild_language_server = {},
pyright = {},
ruff_lsp = {},
html = {},
rust_analyzer = {},
Expand Down Expand Up @@ -60,6 +61,13 @@ return {
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
callback = function(ev)
local client = vim.lsp.get_client_by_id(ev.data.client_id)
if client and client.name == "ruff_lsp" then
-- disable hover in favor of Pyright
client.server_capabilities.hoverProvider = false
end

-- mappings
local map = function(modes, keys, func, desc)
vim.keymap.set(modes, keys, func, { buffer = ev.buf, desc = desc })
end
Expand Down

0 comments on commit 574fec4

Please sign in to comment.