summaryrefslogtreecommitdiff
path: root/lspconfig.lua
diff options
context:
space:
mode:
authorfilip <“filip.rabiega@gmail.com”>2026-02-04 16:34:45 +0100
committerfilip <“filip.rabiega@gmail.com”>2026-02-04 16:34:45 +0100
commit7a7a8ace1dacfff121ce90110c7b5c8635d178c3 (patch)
treea90d1abf42f5b4ea8917e57a02a482ed32a4fae8 /lspconfig.lua
downloadlazy-plugins-7a7a8ace1dacfff121ce90110c7b5c8635d178c3.tar.gz
lazy-plugins-7a7a8ace1dacfff121ce90110c7b5c8635d178c3.tar.bz2
lazy-plugins-7a7a8ace1dacfff121ce90110c7b5c8635d178c3.zip
plugin dump
Diffstat (limited to 'lspconfig.lua')
-rw-r--r--lspconfig.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/lspconfig.lua b/lspconfig.lua
new file mode 100644
index 0000000..1184af8
--- /dev/null
+++ b/lspconfig.lua
@@ -0,0 +1,28 @@
+return {
+ "neovim/nvim-lspconfig",
+ dependencies = { "williamboman/mason.nvim" },
+ config = function()
+ -- Define the configuration for pyright using the native API
+ vim.lsp.config("pyright", {
+ cmd = { "pyright-langserver", "--stdio" },
+ filetypes = { "python" },
+ root_markers = { "pyproject.toml", "setup.py", "requirements.txt", ".git" },
+ settings = {
+ python = {
+ analysis = {
+ autoSearchPaths = true,
+ typeCheckingMode = "basic",
+ },
+ },
+ },
+ })
+
+ -- Trigger the server start for python files
+ vim.api.nvim_create_autocmd("FileType", {
+ pattern = "python",
+ callback = function(args)
+ vim.lsp.start("pyright")
+ end,
+ })
+ end,
+}