mirror of
https://github.com/kossLAN/nvim-flake.git
synced 2025-11-04 17:59:50 -05:00
feat: ts lsp & css lsp
This commit is contained in:
parent
46c3141542
commit
c4de9207c0
4 changed files with 34 additions and 0 deletions
|
|
@ -104,11 +104,14 @@ with final.pkgs.lib; let
|
||||||
jdt-language-server # java ls
|
jdt-language-server # java ls
|
||||||
nixd # nix LSP
|
nixd # nix LSP
|
||||||
rust-analyzer # rust LSP
|
rust-analyzer # rust LSP
|
||||||
|
vscode-langservers-extracted # various web dev lsps from vscode
|
||||||
|
typescript-language-server # css lsp thing
|
||||||
|
|
||||||
# autoformatters
|
# autoformatters
|
||||||
alejandra # amazing nix autoformatter
|
alejandra # amazing nix autoformatter
|
||||||
stylua # lua formatter
|
stylua # lua formatter
|
||||||
rustfmt # rust formatter
|
rustfmt # rust formatter
|
||||||
|
prettierd # typescript/javascript formatter
|
||||||
# google-java-format # java formatter based off google guidelines
|
# google-java-format # java formatter based off google guidelines
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
|
|
|
||||||
15
nvim/ftplugin/css.lua
Normal file
15
nvim/ftplugin/css.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
-- Exit if the language server isn't available
|
||||||
|
if vim.fn.executable('vscode-css-language-server') ~= 1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local root_files = {
|
||||||
|
'.git',
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.lsp.start {
|
||||||
|
name = 'cssls',
|
||||||
|
cmd = { 'vscode-css-language-server', '--stdio' },
|
||||||
|
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
|
||||||
|
capabilities = require('user.lsp').make_client_capabilities(),
|
||||||
|
}
|
||||||
15
nvim/ftplugin/typescript.lua
Normal file
15
nvim/ftplugin/typescript.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
-- Exit if the language server isn't available
|
||||||
|
if vim.fn.executable('typescript-language-server') ~= 1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local root_files = {
|
||||||
|
'.git',
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.lsp.start {
|
||||||
|
name = 'ts_ls',
|
||||||
|
cmd = { 'typescript-language-server', '--stdio' },
|
||||||
|
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
|
||||||
|
capabilities = require('user.lsp').make_client_capabilities(),
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@ require('conform').setup {
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
nix = { 'alejandra' },
|
nix = { 'alejandra' },
|
||||||
rust = { 'rustfmt' },
|
rust = { 'rustfmt' },
|
||||||
|
typescript = { 'prettierd' },
|
||||||
-- Conform will run multiple formatters sequentially
|
-- Conform will run multiple formatters sequentially
|
||||||
-- python = { "isort", "black" },
|
-- python = { "isort", "black" },
|
||||||
-- You can customize some of the format options for the filetype (:help conform.format)
|
-- You can customize some of the format options for the filetype (:help conform.format)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue