update: lsp pyright config

This commit is contained in:
Lucas F. 2024-12-23 15:43:35 -03:00
parent e3e80656c1
commit 931d5b6a90
2 changed files with 29 additions and 12 deletions

View file

@ -43,6 +43,19 @@ return {
---@diagnostic disable: missing-fields ---@diagnostic disable: missing-fields
config = { config = {
-- clangd = { capabilities = { offsetEncoding = "utf-8" } }, -- clangd = { capabilities = { offsetEncoding = "utf-8" } },
pyright = {
settings = {
python = {
analysis = {
autoSearchPaths = true,
diagnosticMode = "workspace",
useLibraryCodeForTypes = true,
typeCheckingMode = "off",
},
},
},
}
}, },
-- customize how language servers are attached -- customize how language servers are attached
handlers = { handlers = {

View file

@ -1,24 +1,28 @@
---@type LazySpec
return { return {
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
dependencies = {
{
"folke/lazydev.nvim",
ft = "lua",
opts = {
library = {
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
},
},
},
},
config = function() config = function()
require("lspconfig").pyright.setup { local capabilities = require("cmp_nvim_lsp").default_capabilities()
settings = { local lspconfig = require "lspconfig"
python = { lspconfig.lua_ls.setup { capabilities = capabilities }
analysis = {
autoSearchPaths = true,
diagnosticMode = "workspace",
useLibraryCodeForTypes = true,
typeCheckingMode = "off",
},
},
},
}
end, end,
}, },
{ {
"williamboman/mason-lspconfig.nvim", "williamboman/mason-lspconfig.nvim",
dependencies = {
{ "williamboman/mason.nvim" },
},
opts = { opts = {
ensure_installed = { ensure_installed = {
"lua_ls", "lua_ls",