feat(nvim): working lsp and formatters
This commit is contained in:
parent
d4c6bc1270
commit
d5d781272d
5 changed files with 27 additions and 4 deletions
|
@ -104,3 +104,8 @@ local function open_nvim_tree(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
||||||
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank { higroup = "IncSearch", timeout = 200 }
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
|
@ -4,10 +4,11 @@ local options = {
|
||||||
css = { "prettier" },
|
css = { "prettier" },
|
||||||
html = { "prettier" },
|
html = { "prettier" },
|
||||||
js = { "prettier" },
|
js = { "prettier" },
|
||||||
|
php = { "php_cs_fixer" },
|
||||||
},
|
},
|
||||||
|
|
||||||
format_on_save = {
|
format_on_save = {
|
||||||
timeout_ms = 50,
|
timeout_ms = 500,
|
||||||
lsp_fallback = true,
|
lsp_fallback = true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,19 @@ require("nvchad.configs.lspconfig").defaults()
|
||||||
local lspconfig = require "lspconfig"
|
local lspconfig = require "lspconfig"
|
||||||
|
|
||||||
-- EXAMPLE
|
-- EXAMPLE
|
||||||
local servers = { "html", "cssls" }
|
local servers = {
|
||||||
|
"html",
|
||||||
|
"cssls",
|
||||||
|
"phpactor",
|
||||||
|
"gopls",
|
||||||
|
-- "intelephense",
|
||||||
|
"jsonls",
|
||||||
|
"lua_ls",
|
||||||
|
"nixd",
|
||||||
|
"tailwindcss",
|
||||||
|
"templ",
|
||||||
|
"vuels",
|
||||||
|
}
|
||||||
local nvlsp = require "nvchad.configs.lspconfig"
|
local nvlsp = require "nvchad.configs.lspconfig"
|
||||||
|
|
||||||
-- lsps with default config
|
-- lsps with default config
|
||||||
|
|
|
@ -87,7 +87,7 @@ return {
|
||||||
rgb_fn = true, -- CSS rgb() and rgba() functions
|
rgb_fn = true, -- CSS rgb() and rgba() functions
|
||||||
hsl_fn = true, -- CSS hsl() and hsla() functions
|
hsl_fn = true, -- CSS hsl() and hsla() functions
|
||||||
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
||||||
css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
||||||
-- Available modes for `mode`: foreground, background, virtualtext
|
-- Available modes for `mode`: foreground, background, virtualtext
|
||||||
mode = "background", -- Set the display mode.
|
mode = "background", -- Set the display mode.
|
||||||
-- Available methods are false / true / "normal" / "lsp" / "both"
|
-- Available methods are false / true / "normal" / "lsp" / "both"
|
||||||
|
@ -98,10 +98,11 @@ return {
|
||||||
virtualtext = "■",
|
virtualtext = "■",
|
||||||
-- update color values even if buffer is not focused
|
-- update color values even if buffer is not focused
|
||||||
-- example use: cmp_menu, cmp_docs
|
-- example use: cmp_menu, cmp_docs
|
||||||
always_update = false,
|
always_update = true,
|
||||||
},
|
},
|
||||||
-- all the sub-options of filetypes apply to buftypes
|
-- all the sub-options of filetypes apply to buftypes
|
||||||
buftypes = {},
|
buftypes = {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{ "lukas-reineke/indent-blankline.nvim", enabled = false },
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
neofetch
|
neofetch
|
||||||
neovim
|
neovim
|
||||||
nil
|
nil
|
||||||
|
nixd
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
nodejs_20
|
nodejs_20
|
||||||
pandoc
|
pandoc
|
||||||
|
@ -50,12 +51,15 @@
|
||||||
pciutils
|
pciutils
|
||||||
php83
|
php83
|
||||||
php83Packages.composer
|
php83Packages.composer
|
||||||
|
php83Packages.php-cs-fixer
|
||||||
|
phpactor
|
||||||
pinentry
|
pinentry
|
||||||
python312Packages.pip
|
python312Packages.pip
|
||||||
ripgrep
|
ripgrep
|
||||||
slides
|
slides
|
||||||
starship
|
starship
|
||||||
symfony-cli
|
symfony-cli
|
||||||
|
tailwindcss-language-server
|
||||||
tmux
|
tmux
|
||||||
tree
|
tree
|
||||||
unzip
|
unzip
|
||||||
|
|
Loading…
Add table
Reference in a new issue