add venv selector
This commit is contained in:
@ -85,16 +85,30 @@ return {
|
||||
end,
|
||||
['pyright'] = function()
|
||||
lspconfig['pyright'].setup({
|
||||
capabilities = capabilities,
|
||||
cmd = { "pyright-langserver", "--stdio" },
|
||||
filetypes = { "python" },
|
||||
-- root_dir = function(filename)
|
||||
-- return util.root_pattern(unpack(root_files))(filename) or util.path.dirname(filename)
|
||||
-- end,
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
useLibraryCodeForTypes = true,
|
||||
typeCheckingMode = "basic",
|
||||
configPath = vim.fn.expand('./pyrightconfig.json')
|
||||
autoSearchPaths = true,
|
||||
diagnosticMode = "workspace",
|
||||
useLibraryCodeForTypes = true
|
||||
}
|
||||
}
|
||||
}
|
||||
-- capabilities = capabilities,
|
||||
-- settings = {
|
||||
-- python = {
|
||||
-- analysis = {
|
||||
-- useLibraryCodeForTypes = true,
|
||||
-- typeCheckingMode = "basic",
|
||||
-- -- configPath = vim.fn.expand('./pyrightconfig.json')
|
||||
-- }
|
||||
-- }
|
||||
-- },
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
24
nvim/lua/config/plugins/venv-selector.lua
Normal file
24
nvim/lua/config/plugins/venv-selector.lua
Normal file
@ -0,0 +1,24 @@
|
||||
return {
|
||||
"linux-cultist/venv-selector.nvim",
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig",
|
||||
-- "mfussenegger/nvim-dap", "mfussenegger/nvim-dap-python", --optional
|
||||
{ "nvim-telescope/telescope.nvim", branch = "0.1.x", dependencies = { "nvim-lua/plenary.nvim" } },
|
||||
},
|
||||
lazy = false,
|
||||
branch = "regexp", -- This is the regexp branch, use this for the new version
|
||||
config = function()
|
||||
require("venv-selector").setup({
|
||||
-- settings = {
|
||||
-- search = {
|
||||
-- my_envs = {
|
||||
-- command = "fd python$ ~/git/cerenim/backend/"
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ ",v", "<cmd>VenvSelect<cr>" },
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user