From 8fbf7c2a9ce92b97941bff2c8b52c1d52d9834d2 Mon Sep 17 00:00:00 2001 From: cryxtalix Date: Sat, 9 May 2026 00:15:07 +0800 Subject: Update --- .config/nvim/lsp/lua_ls.lua | 19 +++++++++++++++++++ .config/nvim/lsp/pyright.lua | 16 ++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .config/nvim/lsp/lua_ls.lua create mode 100644 .config/nvim/lsp/pyright.lua (limited to '.config/nvim/lsp') diff --git a/.config/nvim/lsp/lua_ls.lua b/.config/nvim/lsp/lua_ls.lua new file mode 100644 index 0000000..c0a6d56 --- /dev/null +++ b/.config/nvim/lsp/lua_ls.lua @@ -0,0 +1,19 @@ +return { + -- Command and arguments to start the server. + cmd = { 'lua-language-server' }, + -- Filetypes to automatically attach to. + filetypes = { 'lua' }, + -- Sets the "workspace" to the directory where any of these files is found. + -- Files that share a root directory will reuse the LSP server connection. + -- Nested lists indicate equal priority, see |vim.lsp.Config|. + root_markers = { { '.luarc.json', '.luarc.jsonc' }, '.git' }, + -- Specific settings to send to the server. The schema is server-defined. + -- Example: https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json + settings = { + Lua = { + runtime = { + version = 'LuaJIT', + } + } + } +} diff --git a/.config/nvim/lsp/pyright.lua b/.config/nvim/lsp/pyright.lua new file mode 100644 index 0000000..aece9a7 --- /dev/null +++ b/.config/nvim/lsp/pyright.lua @@ -0,0 +1,16 @@ +return { + 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 = { + autoSearchPaths = true, + diagnosticMode = "workspace", + useLibraryCodeForTypes = true + } + } + } +} -- cgit