Created
July 28, 2024 10:34
-
-
Save eldar/8a79dd4d84b63ed277667401f6cd3e81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | |
if not (vim.uv or vim.loop).fs_stat(lazypath) then | |
local lazyrepo = "https://github.com/folke/lazy.nvim.git" | |
vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) | |
end | |
vim.opt.rtp:prepend(lazypath) | |
require("lazy").setup({ | |
spec = { | |
{ "williamboman/mason.nvim" }, | |
{ "williamboman/mason-lspconfig.nvim" }, | |
{ "neovim/nvim-lspconfig" }, | |
}, | |
}) | |
require('mason').setup({}) | |
local lspconfig = require("lspconfig") | |
require('mason-lspconfig').setup({ | |
ensure_installed = { "basedpyright" }, | |
handlers = { | |
basedpyright = function() | |
lspconfig.basedpyright.setup({ | |
settings = { | |
basedpyright = { | |
analysis = { | |
useLibraryCodeForTypes = true, | |
typeCheckingMode = "basic", -- off, basic, standard, strict, all | |
diagnosticSeverityOverrides = { | |
reportDuplicateImport = "warning", | |
}, | |
}, | |
}, | |
}, | |
root_dir = require("lspconfig.util").root_pattern( | |
"pyproject.toml" | |
), | |
}) | |
end, | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment