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', + }, +}