(neovim) make plugins setup modular, huge changes to keymaps
This commit is contained in:
parent
99f699de06
commit
957ec52ca8
9 changed files with 168 additions and 199 deletions
11
config/common/nvim/lua/plugins/disabled.lua
Normal file
11
config/common/nvim/lua/plugins/disabled.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
{ "akinsho/bufferline.nvim", enabled = false },
|
||||
{ "catppuccin/nvim", enabled = false },
|
||||
{ "folke/persistence.nvim", enabled = false },
|
||||
{ "folke/tokyonight.nvim", enabled = false },
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
{ "MagickDuck/grug-far.nvim", enabled = false },
|
||||
{ "nvim-neo-tree/neo-tree.nvim", enabled = false },
|
||||
{ "todo-comments.nvim", enabled = false },
|
||||
{ "windwp/nvim-ts-autotag", enabled = false },
|
||||
}
|
|
@ -1,178 +0,0 @@
|
|||
return {
|
||||
{ "akinsho/bufferline.nvim", enabled = false },
|
||||
{ "catppuccin/nvim", enabled = false },
|
||||
{ "folke/persistence.nvim", enabled = false },
|
||||
{ "folke/todo-comments.nvim", enabled = false },
|
||||
{ "folke/tokyonight.nvim", enabled = false },
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
{ "MagickDuck/grug-far.nvim", enabled = false },
|
||||
{ "nvim-neo-tree/neo-tree.nvim", enabled = false },
|
||||
{ "windwp/nvim-ts-autotag", enabled = false },
|
||||
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
-- opts = {
|
||||
-- dashboard = { enabled = false },
|
||||
-- },
|
||||
keys = {
|
||||
{
|
||||
"<leader>n",
|
||||
function()
|
||||
vim.cmd("set number!")
|
||||
vim.cmd('execute "set signcolumn=" . (&signcolumn == "yes" ? "no" : "yes")')
|
||||
if Snacks.indent.enabled then
|
||||
Snacks.indent.disable()
|
||||
else
|
||||
Snacks.indent.enable()
|
||||
end
|
||||
end,
|
||||
desc = "Toggle Decorations",
|
||||
},
|
||||
{
|
||||
"<leader>e",
|
||||
function()
|
||||
Snacks.explorer()
|
||||
end,
|
||||
desc = "File Explorer",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts_extend = { "spec" },
|
||||
opts = {
|
||||
preset = "helix",
|
||||
defaults = {},
|
||||
spec = {
|
||||
{
|
||||
mode = { "n", "v" },
|
||||
{ "<leader><tab>", group = "tabs", hidden = true },
|
||||
{ "<leader>c", group = "code", hidden = true },
|
||||
{ "<leader>d", group = "debug", hidden = true },
|
||||
{ "<leader>dp", group = "profiler", hidden = true },
|
||||
{ "<leader>g", group = "git", hidden = true },
|
||||
{ "<leader>gh", group = "hunks", hidden = true },
|
||||
{ "<leader>q", group = "quit/session", hidden = true },
|
||||
{ "<leader>s", group = "search", hidden = true },
|
||||
{ "<leader>u", group = "ui", icon = { icon = " ", color = "cyan" }, hidden = true },
|
||||
{ "<leader>x", group = "diagnostics/quickfix", icon = { icon = " ", color = "green" }, hidden = true },
|
||||
{
|
||||
"<leader>b",
|
||||
group = "buffer",
|
||||
expand = function()
|
||||
return require("which-key.extras").expand.buf()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"<leader>w",
|
||||
group = "windows",
|
||||
proxy = "<c-w>",
|
||||
expand = function()
|
||||
return require("which-key.extras").expand.win()
|
||||
end,
|
||||
hidden = true,
|
||||
},
|
||||
-- better descriptions
|
||||
{ "gx", desc = "Open with system app", hidden = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
build = "cd app && yarn install",
|
||||
init = function()
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
end,
|
||||
ft = { "markdown" },
|
||||
},
|
||||
|
||||
{
|
||||
"loctvl842/monokai-pro.nvim",
|
||||
opts = {
|
||||
filter = "classic",
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "monokai-pro",
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
opts = {
|
||||
options = {
|
||||
theme = "powerline",
|
||||
section_separators = "",
|
||||
component_separators = "",
|
||||
globalstatus = false,
|
||||
},
|
||||
sections = {
|
||||
lualine_c = {
|
||||
{
|
||||
"diagnostics",
|
||||
symbols = {
|
||||
error = LazyVim.config.icons.diagnostics.Error,
|
||||
warn = LazyVim.config.icons.diagnostics.Warn,
|
||||
info = LazyVim.config.icons.diagnostics.Info,
|
||||
hint = LazyVim.config.icons.diagnostics.Hint,
|
||||
},
|
||||
},
|
||||
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
|
||||
{ "filename", file_status = true, path = 1 },
|
||||
},
|
||||
lualine_x = {
|
||||
{
|
||||
"diff",
|
||||
symbols = {
|
||||
added = LazyVim.config.icons.git.added,
|
||||
modified = LazyVim.config.icons.git.modified,
|
||||
removed = LazyVim.config.icons.git.removed,
|
||||
},
|
||||
},
|
||||
},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {
|
||||
lualine_a = { "buffers" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = {
|
||||
"bash",
|
||||
"diff",
|
||||
"gotmpl",
|
||||
"helm",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"terraform",
|
||||
"vim",
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"lua-language-server",
|
||||
"terraform-ls",
|
||||
"tflint",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
10
config/common/nvim/lua/plugins/lsp.lua
Normal file
10
config/common/nvim/lua/plugins/lsp.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"lua-language-server",
|
||||
"terraform-ls",
|
||||
"tflint",
|
||||
},
|
||||
},
|
||||
}
|
40
config/common/nvim/lua/plugins/lualine.lua
Normal file
40
config/common/nvim/lua/plugins/lualine.lua
Normal file
|
@ -0,0 +1,40 @@
|
|||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
opts = {
|
||||
options = {
|
||||
theme = "powerline",
|
||||
section_separators = "",
|
||||
component_separators = "",
|
||||
globalstatus = false,
|
||||
},
|
||||
sections = {
|
||||
lualine_c = {
|
||||
{
|
||||
"diagnostics",
|
||||
symbols = {
|
||||
error = LazyVim.config.icons.diagnostics.Error,
|
||||
warn = LazyVim.config.icons.diagnostics.Warn,
|
||||
info = LazyVim.config.icons.diagnostics.Info,
|
||||
hint = LazyVim.config.icons.diagnostics.Hint,
|
||||
},
|
||||
},
|
||||
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
|
||||
{ "filename", file_status = true, path = 1 },
|
||||
},
|
||||
lualine_x = {
|
||||
{
|
||||
"diff",
|
||||
symbols = {
|
||||
added = LazyVim.config.icons.git.added,
|
||||
modified = LazyVim.config.icons.git.modified,
|
||||
removed = LazyVim.config.icons.git.removed,
|
||||
},
|
||||
},
|
||||
},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {
|
||||
lualine_a = { "buffers" },
|
||||
},
|
||||
},
|
||||
}
|
15
config/common/nvim/lua/plugins/monokai.lua
Normal file
15
config/common/nvim/lua/plugins/monokai.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
return {
|
||||
{
|
||||
"loctvl842/monokai-pro.nvim",
|
||||
priority = 1000,
|
||||
opts = {
|
||||
filter = "classic",
|
||||
},
|
||||
},
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "monokai-pro",
|
||||
},
|
||||
},
|
||||
}
|
28
config/common/nvim/lua/plugins/snacks.lua
Normal file
28
config/common/nvim/lua/plugins/snacks.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
return {
|
||||
"folke/snacks.nvim",
|
||||
opts = {
|
||||
dashboard = { enabled = false },
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>n",
|
||||
function()
|
||||
vim.cmd("set number!")
|
||||
vim.cmd('execute "set signcolumn=" . (&signcolumn == "yes" ? "no" : "yes")')
|
||||
if Snacks.indent.enabled then
|
||||
Snacks.indent.disable()
|
||||
else
|
||||
Snacks.indent.enable()
|
||||
end
|
||||
end,
|
||||
desc = "Toggle Decorations",
|
||||
},
|
||||
{
|
||||
"<leader>e",
|
||||
function()
|
||||
Snacks.explorer()
|
||||
end,
|
||||
desc = "File Explorer",
|
||||
},
|
||||
},
|
||||
}
|
18
config/common/nvim/lua/plugins/treesitter.lua
Normal file
18
config/common/nvim/lua/plugins/treesitter.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"diff",
|
||||
"gotmpl",
|
||||
"helm",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"terraform",
|
||||
"vim",
|
||||
},
|
||||
},
|
||||
}
|
35
config/common/nvim/lua/plugins/which-key.lua
Normal file
35
config/common/nvim/lua/plugins/which-key.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts_extend = { "spec" },
|
||||
opts = {
|
||||
preset = "helix",
|
||||
icons = {
|
||||
mappings = false,
|
||||
},
|
||||
defaults = {},
|
||||
spec = {
|
||||
{
|
||||
mode = { "n", "v" },
|
||||
{
|
||||
"<leader>b",
|
||||
group = "buffer",
|
||||
expand = function()
|
||||
return require("which-key.extras").expand.buf()
|
||||
end,
|
||||
},
|
||||
{ "<leader><tab>", group = "tabs", hidden = true },
|
||||
{ "<leader>d", group = "debug", hidden = true },
|
||||
{ "<leader>dp", group = "profiler", hidden = true },
|
||||
{ "<leader>gh", group = "hunks", hidden = true },
|
||||
{ "<leader>q", group = "quit/session", hidden = true },
|
||||
{ "<leader>s", group = "search", hidden = true },
|
||||
{ "<leader>t", hidden = true },
|
||||
{ "<leader>u", group = "ui", hidden = true },
|
||||
{ "<leader>w", hidden = true },
|
||||
{ "<leader>x", group = "diagnostics/quickfix", hidden = true },
|
||||
{ "gx", desc = "Open with system app", hidden = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue