From fbcb16d2116842b7e6394635c5da97b10e8c83ea Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Tue, 13 Jan 2026 15:51:01 +0100 Subject: Neovim: pyright als LSP hinzugefügt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nvim/lua/plugins/lsp.lua | 46 +++++++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 13 deletions(-) (limited to 'nvim') diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua index 69ba9df..17ca039 100644 --- a/nvim/lua/plugins/lsp.lua +++ b/nvim/lua/plugins/lsp.lua @@ -3,44 +3,64 @@ return { "neovim/nvim-lspconfig", lazy = false, config = function() + local capabilities = vim.lsp.protocol.make_client_capabilities() + vim.lsp.config.lua_ls = { + capabilities = capabilities, settings = { Lua = { + runtime = { + version = "LuaJIT", + }, diagnostics = { globals = { "vim" }, }, workspace = { checkThirdParty = false, library = { - vim.fn.expand("$VIMRUNTIME/lua"), - vim.fn.expand("$XDG_CONFIG_HOME") .. "/nvim/lua", + vim.env.VIMRUNTIME .. "/lua", + vim.fn.stdpath("config") .. "/lua", }, }, + telemetry = { + enable = false, + }, }, }, } vim.lsp.config.bashls = { + capabilities = capabilities, + filetypes = { "sh", "bash", "zsh" }, + } + + vim.lsp.config.clangd = { + capabilities = capabilities, + } + + vim.lsp.config.tsserver = { + capabilities = capabilities, + } + + vim.lsp.config.pyright = { + capabilities = capabilities, settings = { - bashIde = { - shellcheck = { -- pkg install hs-ShellCheck - enable = true, - severity = { - error = "error", - warning = "warning", - info = "info", - }, + python = { + analysis = { + typeCheckingMode = "basic", -- oder "strict" für strenger + autoSearchPaths = true, + useLibraryCodeForTypes = true, }, - globPattern = "**/*.sh", }, }, } vim.lsp.enable({ - "bashls", -- npm install -g bash-language-server + "bashls", -- npm install -g bash-language-server, pkg install hs-ShellCheck "clangd", -- pkg install llvm "lua_ls", -- pkg install lua-language-server - "ts_ls", -- npm install -g typescript typescript-language-server + "tsserver", -- npm install -g typescript typescript-language-server + "pyright", -- npm install -g pyright, brew install pyright }) end, }, -- cgit v1.3