Python LSP! :)
This commit is contained in:
parent
74b4479f46
commit
42338823be
2 changed files with 27 additions and 13 deletions
18
init.lua
18
init.lua
|
|
@ -722,7 +722,20 @@ require('lazy').setup({
|
|||
local servers = {
|
||||
-- clangd = {},
|
||||
-- gopls = {},
|
||||
-- pyright = {},
|
||||
pyright = {
|
||||
cmd = { 'pyright-langserver', '--stdio' },
|
||||
settings = {
|
||||
python = {
|
||||
pythonPath = '/Users/fq/.pyenv/versions/3.13.1/envs/rca/bin/python3',
|
||||
analysis = {
|
||||
extraPaths = {'/Users/fq/.pyenv/versions/3.13.1/envs/rca/lib/python3.13/site-packages'},
|
||||
autoSearchPaths = true,
|
||||
useLibraryCodeForTypes = true,
|
||||
diagnosticMode = 'workspace',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- rust_analyzer = {},
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
--
|
||||
|
|
@ -765,6 +778,7 @@ require('lazy').setup({
|
|||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'stylua', -- Used to format Lua code
|
||||
'pyright', -- Python LSP server
|
||||
})
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
|
|
@ -1025,7 +1039,7 @@ require('lazy').setup({
|
|||
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||
opts = {
|
||||
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
|
||||
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'python', 'query', 'vim', 'vimdoc' },
|
||||
-- Autoinstall languages that are not installed
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue