From 9da1f36e172b292078cf4a7833c158a8631aed10 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Fri, 25 Jul 2025 15:09:36 +0545 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20add=20configurations=20for?= =?UTF-8?q?=20typescript=20and=20python=20language=20servers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lsp/python.lua | 17 +++++++++++++++++ lsp/tailwindcss.lua | 21 ++++----------------- lsp/typescript.lua | 8 ++++++++ 3 files changed, 29 insertions(+), 17 deletions(-) create mode 100644 lsp/python.lua create mode 100644 lsp/typescript.lua diff --git a/lsp/python.lua b/lsp/python.lua new file mode 100644 index 0000000..abf49c6 --- /dev/null +++ b/lsp/python.lua @@ -0,0 +1,17 @@ +return { + cmd = { 'pyright-langserver', '--stdio' }, + filetypes = { 'py', 'python' }, + root_markers = { 'pyproject.toml', 'setup.py', 'setup.cfg', 'requirements.txt' }, + settings = { + python = { + analysis = { + -- autoSearchPaths = true, + diagnosticMode = 'openFilesOnly', + -- useLibraryCodeForTypes = true, + }, + }, + }, + init_options = { + hostInfo = 'neovim', + }, +} diff --git a/lsp/tailwindcss.lua b/lsp/tailwindcss.lua index 5cce4e9..258ad2b 100644 --- a/lsp/tailwindcss.lua +++ b/lsp/tailwindcss.lua @@ -1,21 +1,8 @@ return { - filetypes = { - 'html', - 'css', - 'scss', - 'javascript', - 'javascriptreact', - 'typescript', - 'typescriptreact', - 'vue', - 'svelte', - }, + cmd = { 'tailwindcss-language-server' }, + root_markers = { 'tsconfig.json', 'jsconfig.json', 'package.json', '.git' }, + filetypes = { 'javascript', 'javascriptreact', 'javascript.jsx', 'typescript', 'typescriptreact', 'typescript.tsx' }, init_options = { - userLanguages = { - ['javascript'] = 'javascript', - ['javascriptreact'] = 'javascript', - ['typescript'] = 'typescript', - ['typescriptreact'] = 'typescript', - }, + hostInfo = 'neovim', }, } diff --git a/lsp/typescript.lua b/lsp/typescript.lua new file mode 100644 index 0000000..be055f8 --- /dev/null +++ b/lsp/typescript.lua @@ -0,0 +1,8 @@ +return { + cmd = { 'typescript-language-server', '--stdio' }, + root_markers = { 'tsconfig.json', 'jsconfig.json', 'package.json', '.git' }, + filetypes = { 'javascript', 'javascriptreact', 'javascript.jsx', 'typescript', 'typescriptreact', 'typescript.tsx' }, + init_options = { + hostInfo = 'neovim', + }, +}