Include copilot chat and completions.
Refactor configuration into more modules
This commit is contained in:
parent
b6d0624e34
commit
05874830dd
4 changed files with 160 additions and 103 deletions
|
@ -1,102 +1,61 @@
|
|||
return {
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
tag = "v1.11.0",
|
||||
config = function()
|
||||
require("mason").setup({})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
tag = "v1.32.0",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"lua_ls",
|
||||
"bashls",
|
||||
"dockerls",
|
||||
--"gh-actions-language-server",
|
||||
"helm_ls",
|
||||
"jsonls",
|
||||
"marksman",
|
||||
"nginx_language_server",
|
||||
"ruff",
|
||||
"yamlls",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.formatting.mdformat,
|
||||
},
|
||||
})
|
||||
vim.keymap.set("n", "<leader>af", vim.lsp.buf.format, { desc = "Auto-Format File" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
tag = "v1.8.0",
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.lua_ls.setup({})
|
||||
lspconfig.bashls.setup({})
|
||||
lspconfig.dockerls.setup({})
|
||||
lspconfig.helm_ls.setup({})
|
||||
lspconfig.jsonls.setup({})
|
||||
lspconfig.nginx_language_server.setup({})
|
||||
lspconfig.marksman.setup({})
|
||||
lspconfig.ruff.setup({})
|
||||
lspconfig.yamlls.setup({})
|
||||
vim.keymap.set("n", "<leader>d", vim.lsp.buf.hover, { desc = "Show Docstring" })
|
||||
vim.keymap.set("n", "<leader>gt", vim.lsp.buf.definition, { desc = "Go To Definition" })
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "Show Code Actions" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
local config = require("nvim-treesitter.configs")
|
||||
config.setup({
|
||||
-- A list of parser names, or "all" (the listed parsers MUST always be installed)
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"query",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"json",
|
||||
"jsonc",
|
||||
"python",
|
||||
"yaml",
|
||||
},
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
|
||||
-- List of parsers to ignore installing (or "all")
|
||||
ignore_install = { "javascript" },
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
tag = "v1.11.0",
|
||||
config = function()
|
||||
require("mason").setup({})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
tag = "v1.32.0",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"lua_ls",
|
||||
"bashls",
|
||||
"dockerls",
|
||||
--"gh-actions-language-server",
|
||||
"helm_ls",
|
||||
"jsonls",
|
||||
"marksman",
|
||||
"nginx_language_server",
|
||||
"ruff",
|
||||
"yamlls",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.formatting.mdformat,
|
||||
},
|
||||
})
|
||||
vim.keymap.set("n", "<leader>af", vim.lsp.buf.format, { desc = "Auto-Format File" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
tag = "v1.8.0",
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.lua_ls.setup({})
|
||||
lspconfig.bashls.setup({})
|
||||
lspconfig.dockerls.setup({})
|
||||
lspconfig.helm_ls.setup({})
|
||||
lspconfig.jsonls.setup({})
|
||||
lspconfig.nginx_language_server.setup({})
|
||||
lspconfig.marksman.setup({})
|
||||
lspconfig.ruff.setup({})
|
||||
lspconfig.yamlls.setup({})
|
||||
vim.keymap.set("n", "<leader>d", vim.lsp.buf.hover, { desc = "Show Docstring" })
|
||||
vim.keymap.set("n", "<leader>gt", vim.lsp.buf.definition, { desc = "Go To Definition" })
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "Show Code Actions" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue