mirror of
https://github.com/halfdan/dotfiles.git
synced 2025-09-11 04:06:23 +00:00
Migrate neovim config to lua
This commit is contained in:
22
.config/nvim/lua/lsp/python-ls.lua
Normal file
22
.config/nvim/lua/lsp/python-ls.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
-- npm i -g pyright
|
||||
require'lspconfig'.pyright.setup {
|
||||
cmd = {DATA_PATH .. "/lspinstall/python/node_modules/.bin/pyright-langserver", "--stdio"},
|
||||
on_attach = require'lsp'.common_on_attach,
|
||||
handlers = {
|
||||
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||
virtual_text = O.python.diagnostics.virtual_text,
|
||||
signs = O.python.diagnostics.signs,
|
||||
underline = O.python.diagnostics.underline,
|
||||
update_in_insert = true
|
||||
})
|
||||
},
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
typeCheckingMode = O.python.analysis.type_checking,
|
||||
autoSearchPaths = O.python.analysis.auto_search_paths,
|
||||
useLibraryCodeForTypes = O.python.analysis.use_library_code_types
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user