Refactor nvim config into logical modules
This commit is contained in:
parent
d2467209b7
commit
ec5a00e99d
9 changed files with 134 additions and 130 deletions
|
@ -12,6 +12,7 @@ vim.cmd("set shiftwidth=2")
|
||||||
|
|
||||||
-- Configure Editor Settings
|
-- Configure Editor Settings
|
||||||
vim.cmd("set number")
|
vim.cmd("set number")
|
||||||
|
vim.cmd("set spl=en_us spell")
|
||||||
vim.opt.guifont = "JetBrainsMonoNerdFontMono:14"
|
vim.opt.guifont = "JetBrainsMonoNerdFontMono:14"
|
||||||
-- Custom Key Binds
|
-- Custom Key Binds
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
return {
|
|
||||||
"romgrk/barbar.nvim",
|
|
||||||
tag = "v1.9.0",
|
|
||||||
--init = function()
|
|
||||||
-- vim.g.barbar_auto_setup = false
|
|
||||||
--end,
|
|
||||||
}
|
|
31
.config/nvim/lua/plugins/chrome.lua
Normal file
31
.config/nvim/lua/plugins/chrome.lua
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
config = function()
|
||||||
|
require("lualine").setup({
|
||||||
|
options = {
|
||||||
|
--`theme=codedark,
|
||||||
|
component_separators = { left = "", right = "" },
|
||||||
|
section_separators = { left = "", right = "" },
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = { "mode" },
|
||||||
|
lualine_b = { "branch", "diff", "diagnostics" },
|
||||||
|
lualine_c = { "filename" },
|
||||||
|
lualine_x = { "encoding", "filetype" },
|
||||||
|
lualine_y = { "progress" },
|
||||||
|
lualine_z = { "location" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
|
||||||
|
"romgrk/barbar.nvim",
|
||||||
|
tag = "v1.9.0",
|
||||||
|
--init = function()
|
||||||
|
-- vim.g.barbar_auto_setup = false
|
||||||
|
--end,
|
||||||
|
},
|
||||||
|
}
|
102
.config/nvim/lua/plugins/language-server.lua
Normal file
102
.config/nvim/lua/plugins/language-server.lua
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,21 +0,0 @@
|
||||||
return {
|
|
||||||
'nvim-lualine/lualine.nvim',
|
|
||||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
|
||||||
config = function()
|
|
||||||
require('lualine').setup({
|
|
||||||
options = {
|
|
||||||
--`theme=codedark,
|
|
||||||
component_separators = { left = '', right = '' },
|
|
||||||
section_separators = { left = '', right = '' },
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = {'mode'},
|
|
||||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
|
||||||
lualine_c = {'filename'},
|
|
||||||
lualine_x = {'encoding', 'filetype'},
|
|
||||||
lualine_y = {'progress'},
|
|
||||||
lualine_z = {'location'}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
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,
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
return {
|
|
||||||
"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,
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
return {
|
|
||||||
"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,
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
return {
|
|
||||||
"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,
|
|
||||||
}
|
|
Loading…
Reference in a new issue