more scripts
This commit is contained in:
26
nvchad/custom/plugins/init.lua
Normal file
26
nvchad/custom/plugins/init.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
return {
|
||||
["wakatime/vim-wakatime"] = {},
|
||||
["sbdchd/neoformat"] = {},
|
||||
["williamboman/mason-lspconfig.nvim"] = {},
|
||||
["neovim/nvim-lspconfig"] = {
|
||||
config = function ()
|
||||
require "plugins.configs.lspconfig"
|
||||
require "custom.plugins.lspconfig"
|
||||
end
|
||||
},
|
||||
["windwp/nvim-ts-autotag"] = {
|
||||
ft = { "html", "javascriptreact", "typescriptreact", "astro"},
|
||||
after = "nvim-treesitter",
|
||||
config = function()
|
||||
local present, autotag = pcall(require, "nvim-ts-autotag")
|
||||
|
||||
if present then
|
||||
autotag.setup()
|
||||
end
|
||||
end
|
||||
},
|
||||
["lervag/vimtex"] = {},
|
||||
["sindrets/diffview.nvim"] = {},
|
||||
["ThePrimeagen/refactoring.nvim"] = {},
|
||||
["ThePrimeagen/harpoon"] = {},
|
||||
}
|
||||
24
nvchad/custom/plugins/lspconfig.lua
Normal file
24
nvchad/custom/plugins/lspconfig.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
local on_attach = require("plugins.configs.lspconfig").on_attach
|
||||
local capabilities = require("plugins.configs.lspconfig").capabilities
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
local servers = {"tailwindcss", "eslint", "cssls", "prismals", "gopls", "dockerls", "yamlls", "hls"}
|
||||
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end
|
||||
|
||||
lspconfig.denols.setup {
|
||||
on_attach = on_attach,
|
||||
root_dir = lspconfig.util.root_pattern("deno.json", "deno.jsonc"),
|
||||
}
|
||||
|
||||
lspconfig.tsserver.setup {
|
||||
on_attach = on_attach,
|
||||
root_dir = lspconfig.util.root_pattern("package.json"),
|
||||
single_file_support = false,
|
||||
enable = false,
|
||||
}
|
||||
Reference in New Issue
Block a user