Comments (10)
from nvimdots.
试试这样设置:https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#pyright
from nvimdots.
https://www.reddit.com/r/neovim/comments/n5gcsx/pyright_luaconfig_not_getting_my_pyenv_environment/
from nvimdots.
请问如果设置的话,还是在这个lspconfig.lua文件里设置吗,具体应该是怎么设置?
对不起,问题有些小白,但我确实是刚接触lua,还不是很明白!
from nvimdots.
我想你应该是需要在项目的根目录下面手动创建一个pyrightconfig.json
文件,里面填写好venv
的path
:
{
"venv": "path",
}
from nvimdots.
from nvimdots.
lspconfig.lua
:
local function setup_servers()
lsp_install.setup()
local servers = lsp_install.installed_servers()
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {
capabilities = capabilities,
on_attach = function()
require('lsp_signature').on_attach({
bind = true,
use_lspsaga = false,
floating_window = true,
fix_pos = true,
hint_enable = true,
hi_parameter = "Search",
handler_opts = {"double"}
})
end,
settings = {
python = {
analysis = {
autoSearchPaths = true,
useLibraryCodeForTypes = false
}
}
}
}
end
end
from nvimdots.
require'lspconfig'.pyright.setup{}
这一部分不需要加入吗?
另外如果我想使用pylsp的话,应该怎么加入呢
谢谢!
from nvimdots.
pip install python-lsp-server --user
add nvim_lsp.pylsp.setup{}
to lspconfig
.
from nvimdots.
谢谢您的回答!
from nvimdots.
Related Issues (20)
- Questions (Thoughts) regarding recent changes HOT 4
- Update catppuccin version (Huge performance issue on nightly) HOT 3
- How to modify keymap for Vim plugin HOT 13
- How to configure plugins for neovim to support Rust-DAP and smart tips for variable types in Rust HOT 5
- maybe load_extension fzf bug HOT 2
- Can't switch open-tabs HOT 3
- How to setup the python environment? HOT 32
- query.lua:259: query: invalid node type at position 574 for language swift HOT 10
- How to (re)install nvimdots HOT 5
- <C-V> in NvimTree can't work HOT 7
- In Inerst mode use <capslock> mapping <Esc> not work HOT 6
- How to custom user config for nvim-cmp mapping HOT 5
- replace `vim.tbl_islist()` with `vim.islist()` after `NVIM v0.10.0-dev-2560` HOT 3
- golang code hints default selected location is incorrect
- Color scheme HOT 2
- Sluggish WSL clipboard communication HOT 2
- skip lines when executing multiple macro operations HOT 9
- UI FIX HOT 3
- [migration] Nvim 0.10 Support HOT 2
- `<CR>` triggers autocompl instead of line break HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvimdots.