Add lua type annotation and make sure to use opts where possible
This commit is contained in:
parent
d2a4babb2e
commit
6c49b81f5a
|
@ -1,8 +1,12 @@
|
||||||
-- https://github.com/altermo/ultimate-autopair.nvim
|
-- https://github.com/altermo/ultimate-autopair.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"altermo/ultimate-autopair.nvim",
|
"altermo/ultimate-autopair.nvim",
|
||||||
event = { "InsertEnter", "CmdlineEnter" },
|
event = { "InsertEnter", "CmdlineEnter" },
|
||||||
branch = "v0.6",
|
branch = "v0.6",
|
||||||
|
--- @module "ultimate-autopair"
|
||||||
|
--- @type prof.def.conf
|
||||||
opts = {
|
opts = {
|
||||||
fastwarp = {
|
fastwarp = {
|
||||||
faster = true,
|
faster = true,
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
-- https://github.com/saghen/blink.cmp
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"saghen/blink.cmp",
|
"saghen/blink.cmp",
|
||||||
-- optional: provides snippets for the snippet source
|
-- optional: provides snippets for the snippet source
|
||||||
|
@ -6,7 +9,7 @@ return {
|
||||||
-- use a release tag to download pre-built binaries
|
-- use a release tag to download pre-built binaries
|
||||||
version = "1.*",
|
version = "1.*",
|
||||||
|
|
||||||
---@module 'blink.cmp'
|
--- @module "blink-cmp"
|
||||||
--- @type blink.cmp.Config
|
--- @type blink.cmp.Config
|
||||||
opts = {
|
opts = {
|
||||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
-- https://github.com/ojroques/nvim-bufdel
|
-- https://github.com/ojroques/nvim-bufdel
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"ojroques/nvim-bufdel",
|
"ojroques/nvim-bufdel",
|
||||||
cmd = { "BufDel", "BuffDelOthers" },
|
cmd = { "BufDel", "BuffDelOthers" },
|
||||||
|
|
|
@ -2,31 +2,13 @@
|
||||||
local diagnostic = require("symbols.diagnostic")
|
local diagnostic = require("symbols.diagnostic")
|
||||||
local file = require("symbols.file")
|
local file = require("symbols.file")
|
||||||
|
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
config = function()
|
--- @module "bufferline"
|
||||||
-- Enable mousemoveevent if possible
|
--- @type bufferline.UserConfig
|
||||||
vim.o.mousemoveevent = true
|
opts = {
|
||||||
|
|
||||||
local bufferline = require("bufferline")
|
|
||||||
|
|
||||||
-- Setup keybinds to move between buffers
|
|
||||||
vim.keymap.set("n", "<tab>", function()
|
|
||||||
bufferline.cycle(1)
|
|
||||||
end, { silent = true, desc = "Goto next buffer" })
|
|
||||||
vim.keymap.set("n", "<S-tab>", function()
|
|
||||||
bufferline.cycle(-1)
|
|
||||||
end, { silent = true, desc = "Goto previous buffer" })
|
|
||||||
|
|
||||||
-- Setup keybinds to move buffers around
|
|
||||||
vim.keymap.set("n", "<leader>b[", function()
|
|
||||||
bufferline.move(-1)
|
|
||||||
end, { silent = true, desc = "Move buffer to left" })
|
|
||||||
vim.keymap.set("n", "<leader>b]", function()
|
|
||||||
bufferline.move(1)
|
|
||||||
end, { silent = true, desc = "Move buffer to right" })
|
|
||||||
|
|
||||||
bufferline.setup({
|
|
||||||
options = {
|
options = {
|
||||||
show_buffer_icons = false,
|
show_buffer_icons = false,
|
||||||
show_buffer_close_icons = false,
|
show_buffer_close_icons = false,
|
||||||
|
@ -51,6 +33,22 @@ return {
|
||||||
return s
|
return s
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
|
init = function()
|
||||||
|
-- Setup keybinds to move between buffers
|
||||||
|
vim.keymap.set("n", "<tab>", function()
|
||||||
|
require("bufferline").cycle(1)
|
||||||
|
end, { silent = true, desc = "Goto next buffer" })
|
||||||
|
vim.keymap.set("n", "<S-tab>", function()
|
||||||
|
require("bufferline").cycle(-1)
|
||||||
|
end, { silent = true, desc = "Goto previous buffer" })
|
||||||
|
|
||||||
|
-- Setup keybinds to move buffers around
|
||||||
|
vim.keymap.set("n", "<leader>b[", function()
|
||||||
|
require("bufferline").move(-1)
|
||||||
|
end, { silent = true, desc = "Move buffer to left" })
|
||||||
|
vim.keymap.set("n", "<leader>b]", function()
|
||||||
|
require("bufferline").move(1)
|
||||||
|
end, { silent = true, desc = "Move buffer to right" })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
-- https://github.com/NvChad/nvim-colorizer.lua
|
-- https://github.com/NvChad/nvim-colorizer.lua
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"NvChad/nvim-colorizer.lua",
|
"NvChad/nvim-colorizer.lua",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
-- https://github.com/numToStr/Comment.nvim
|
-- https://github.com/numToStr/Comment.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"numToStr/Comment.nvim",
|
"numToStr/Comment.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
|
--- @module "Comment"
|
||||||
|
--- @type CommentConfig
|
||||||
opts = {
|
opts = {
|
||||||
toggler = {
|
toggler = {
|
||||||
block = "gBc",
|
block = "gBc",
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
-- https://github.com/stevearc/conform.nvim
|
-- https://github.com/stevearc/conform.nvim
|
||||||
local slow_format_filetypes = {}
|
local slow_format_filetypes = {}
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
event = { "BufWritePre" },
|
event = { "BufWritePre" },
|
||||||
|
@ -15,6 +17,8 @@ return {
|
||||||
desc = "Format buffer",
|
desc = "Format buffer",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
--- @module "conform"
|
||||||
|
--- @type conform.setupOpts
|
||||||
opts = {
|
opts = {
|
||||||
formatters_by_ft = (function()
|
formatters_by_ft = (function()
|
||||||
local formatters = require("tools.format")
|
local formatters = require("tools.format")
|
||||||
|
@ -58,7 +62,6 @@ return {
|
||||||
end
|
end
|
||||||
return { lsp_fallback = true }
|
return { lsp_fallback = true }
|
||||||
end,
|
end,
|
||||||
-- log_level = vim.log.levels.DEBUG,
|
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||||
|
@ -72,6 +75,7 @@ return {
|
||||||
desc = "Disable autoformat-on-save",
|
desc = "Disable autoformat-on-save",
|
||||||
bang = true,
|
bang = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("FormatEnable", function()
|
vim.api.nvim_create_user_command("FormatEnable", function()
|
||||||
vim.b.disable_autoformat = false
|
vim.b.disable_autoformat = false
|
||||||
vim.g.disable_autoformat = false
|
vim.g.disable_autoformat = false
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
-- https://github.com/mfussenegger/nvim-dap
|
-- https://github.com/mfussenegger/nvim-dap
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
-- https://github.com/j-hui/fidget.nvim
|
-- https://github.com/j-hui/fidget.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"j-hui/fidget.nvim",
|
"j-hui/fidget.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
-- https://github.com/lewis6991/gitsigns.nvim
|
-- https://github.com/lewis6991/gitsigns.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
--- @module "gitsigns"
|
||||||
|
--- @type Gitsigns.Config
|
||||||
opts = {
|
opts = {
|
||||||
signs = {
|
signs = {
|
||||||
add = { text = "+" },
|
add = { text = "+" },
|
||||||
|
@ -28,6 +33,7 @@ return {
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
local ga = require("gitsigns.actions")
|
local ga = require("gitsigns.actions")
|
||||||
|
|
||||||
vim.keymap.set("n", "gs", ga.stage_hunk, { desc = "(Un)stage hunk" })
|
vim.keymap.set("n", "gs", ga.stage_hunk, { desc = "(Un)stage hunk" })
|
||||||
vim.keymap.set("n", "gS", ga.stage_buffer, { desc = "Stage buffer" })
|
vim.keymap.set("n", "gS", ga.stage_buffer, { desc = "Stage buffer" })
|
||||||
vim.keymap.set("v", "gs", function()
|
vim.keymap.set("v", "gs", function()
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
-- https://github.com/NMAC427/guess-indent.nvim
|
-- https://github.com/NMAC427/guess-indent.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
-- Adds a command to automatically detect the indentation settings
|
|
||||||
-- Prefer to use .editorconfig for projects and modeline for files
|
|
||||||
"NMAC427/guess-indent.nvim",
|
"NMAC427/guess-indent.nvim",
|
||||||
|
--- @module "guess-indent"
|
||||||
|
--- @type GuessIndentConfig
|
||||||
opts = {},
|
opts = {},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
-- https://github.com/smjonas/inc-rename.nvim
|
-- https://github.com/smjonas/inc-rename.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"smjonas/inc-rename.nvim",
|
"smjonas/inc-rename.nvim",
|
||||||
|
--- @module "inc_rename"
|
||||||
|
--- @type inc_rename.UserConfig
|
||||||
opts = {
|
opts = {
|
||||||
preview_empty_name = true,
|
preview_empty_name = true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
-- https://github.com/lukas-reineke/indent-blankline.nvim
|
-- https://github.com/lukas-reineke/indent-blankline.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
-- Add indentation guides even on blank lines
|
-- Add indentation guides even on blank lines
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
-- Enable `lukas-reineke/indent-blankline.nvim`
|
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||||
-- See `:help indent_blankline.txt`
|
-- See `:help indent_blankline.txt`
|
||||||
main = "ibl",
|
main = "ibl",
|
||||||
|
---@module "ibl"
|
||||||
|
---@type ibl.config
|
||||||
opts = {
|
opts = {
|
||||||
indent = {
|
indent = {
|
||||||
char = "¦",
|
char = "¦",
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
-- https://github.com/diogo464/kubernetes.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"diogo464/kubernetes.nvim",
|
"diogo464/kubernetes.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
-- https://github.com/folke/lazydev.nvim
|
-- https://github.com/folke/lazydev.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
{
|
|
||||||
"folke/lazydev.nvim",
|
"folke/lazydev.nvim",
|
||||||
ft = "lua",
|
ft = "lua",
|
||||||
|
--- @module "lazydev"
|
||||||
|
--- @type lazydev.Config
|
||||||
opts = {
|
opts = {
|
||||||
library = {
|
library = {
|
||||||
-- See the configuration section for more details
|
-- See the configuration section for more details
|
||||||
|
@ -10,5 +13,4 @@ return {
|
||||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
6
nvim/dot-config/nvim/lua/plugins/lspconfig.lua
Normal file
6
nvim/dot-config/nvim/lua/plugins/lspconfig.lua
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
-- https://github.com/neovim/nvim-lspconfig
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
|
return {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
}
|
|
@ -8,6 +8,8 @@ local function get_schema()
|
||||||
return schema.name
|
return schema.name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
|
-- https://github.com/mason-org/mason-lspconfig.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"mason-org/mason-lspconfig.nvim",
|
"mason-org/mason-lspconfig.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
--- @module "mason-lspconfig"
|
||||||
|
--- @type MasonLspconfigSettings
|
||||||
opts = {},
|
opts = {},
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"mason-org/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
|
--- https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"mason-org/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
"mason-org/mason-lspconfig.nvim",
|
|
||||||
"zapling/mason-conform.nvim",
|
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local lsp = require("tools.lsp")
|
local lsp = require("tools.lsp")
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
|
-- https://github.com/mason-org/mason.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"mason-org/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
|
--- @module "mason"
|
||||||
|
--- @type MasonSettings
|
||||||
opts = {},
|
opts = {},
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
local fold = require("symbols.fold")
|
local fold = require("symbols.fold")
|
||||||
local file = require("symbols.file")
|
local file = require("symbols.file")
|
||||||
|
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
version = "v3.x",
|
version = "v3.x",
|
||||||
|
@ -15,8 +17,9 @@ return {
|
||||||
},
|
},
|
||||||
-- netrw hijack does not work when lazy loading
|
-- netrw hijack does not work when lazy loading
|
||||||
lazy = false,
|
lazy = false,
|
||||||
config = function()
|
--- @module "neo-tree"
|
||||||
require("neo-tree").setup({
|
--- @type neotree.Config
|
||||||
|
opts = {
|
||||||
close_if_last_window = true,
|
close_if_last_window = true,
|
||||||
popup_border_style = require("symbols.window").border,
|
popup_border_style = require("symbols.window").border,
|
||||||
source_selector = {
|
source_selector = {
|
||||||
|
@ -51,6 +54,7 @@ return {
|
||||||
folder_closed = fold.closed,
|
folder_closed = fold.closed,
|
||||||
folder_open = fold.open,
|
folder_open = fold.open,
|
||||||
folder_empty = fold.empty,
|
folder_empty = fold.empty,
|
||||||
|
folder_empty_open = fold.open,
|
||||||
default = file.icon,
|
default = file.icon,
|
||||||
},
|
},
|
||||||
modified = {
|
modified = {
|
||||||
|
@ -82,7 +86,7 @@ return {
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
popup = {
|
popup = {
|
||||||
title = function(state)
|
title = function()
|
||||||
return ""
|
return ""
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
@ -94,6 +98,5 @@ return {
|
||||||
["<S-tab>"] = "prev_source",
|
["<S-tab>"] = "prev_source",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
-- https://github.com/toppair/peek.nvim
|
-- https://github.com/toppair/peek.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"toppair/peek.nvim",
|
"toppair/peek.nvim",
|
||||||
build = "deno task --quiet build:fast",
|
build = "deno task --quiet build:fast",
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
-- https://github.com/tadachs/ros-nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"tadachs/ros-nvim",
|
"tadachs/ros-nvim",
|
||||||
opts = {
|
opts = {
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
local kubernetes = {}
|
-- https://github.com/cenk1cenk2/schema-companion.nvim
|
||||||
kubernetes.name = "Kubernetes"
|
--- @module "schema-companion"
|
||||||
|
--- @type schema_companion.Matcher
|
||||||
---@type schema_companion.MatcherMatchFn
|
local kubernetes = {
|
||||||
kubernetes.match = function(bufnr)
|
name = "Kubernetes",
|
||||||
|
match = function(bufnr)
|
||||||
local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
|
local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
|
||||||
local kind = false
|
local kind = false
|
||||||
local api_version = false
|
local api_version = false
|
||||||
|
@ -25,8 +26,11 @@ kubernetes.match = function(bufnr)
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
end
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"cenk1cenk2/schema-companion.nvim",
|
"cenk1cenk2/schema-companion.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
@ -34,16 +38,7 @@ return {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
"diogo464/kubernetes.nvim",
|
"diogo464/kubernetes.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
init = function()
|
||||||
require("schema-companion").setup({
|
|
||||||
enable_telescope = true,
|
|
||||||
matchers = {
|
|
||||||
kubernetes,
|
|
||||||
},
|
|
||||||
schemas = {},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- TODO: Set on lsp attach with filetype yaml?
|
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
"n",
|
"n",
|
||||||
"<leader>ss",
|
"<leader>ss",
|
||||||
|
@ -61,4 +56,13 @@ return {
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
|
--- @module "schema-companion"
|
||||||
|
--- @type schema_companion.Config
|
||||||
|
opts = {
|
||||||
|
enable_telescope = true,
|
||||||
|
matchers = {
|
||||||
|
kubernetes,
|
||||||
|
},
|
||||||
|
schemas = {},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
-- https://github.com/b0o/schemastore.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"b0o/schemastore.nvim",
|
"b0o/schemastore.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
-- https://github.com/mrjones2014/smart-splits.nvim
|
-- https://github.com/mrjones2014/smart-splits.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"mrjones2014/smart-splits.nvim",
|
"mrjones2014/smart-splits.nvim",
|
||||||
config = function()
|
opts = {
|
||||||
|
at_edge = "stop",
|
||||||
|
cursor_follows_swapped_bufs = true,
|
||||||
|
},
|
||||||
|
init = function()
|
||||||
vim.keymap.set("n", "<M-h>", require("smart-splits").move_cursor_left)
|
vim.keymap.set("n", "<M-h>", require("smart-splits").move_cursor_left)
|
||||||
vim.keymap.set("n", "<M-j>", require("smart-splits").move_cursor_down)
|
vim.keymap.set("n", "<M-j>", require("smart-splits").move_cursor_down)
|
||||||
vim.keymap.set("n", "<M-k>", require("smart-splits").move_cursor_up)
|
vim.keymap.set("n", "<M-k>", require("smart-splits").move_cursor_up)
|
||||||
|
@ -16,10 +22,5 @@ return {
|
||||||
vim.keymap.set("n", "<M-down>", require("smart-splits").resize_down, { desc = "Resize buffer to the bottom" })
|
vim.keymap.set("n", "<M-down>", require("smart-splits").resize_down, { desc = "Resize buffer to the bottom" })
|
||||||
vim.keymap.set("n", "<M-up>", require("smart-splits").resize_up, { desc = "Resize buffer to the top" })
|
vim.keymap.set("n", "<M-up>", require("smart-splits").resize_up, { desc = "Resize buffer to the top" })
|
||||||
vim.keymap.set("n", "<M-right>", require("smart-splits").resize_right, { desc = "Resize buffer to the right" })
|
vim.keymap.set("n", "<M-right>", require("smart-splits").resize_right, { desc = "Resize buffer to the right" })
|
||||||
|
|
||||||
require("smart-splits").setup({
|
|
||||||
at_edge = "stop",
|
|
||||||
cursor_follows_swapped_bufs = true,
|
|
||||||
})
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
-- https://github.com/kylechui/nvim-surround
|
-- https://github.com/kylechui/nvim-surround
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"kylechui/nvim-surround",
|
"kylechui/nvim-surround",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
config = true,
|
--- @module "nvim-surround"
|
||||||
|
--- @type user_options
|
||||||
|
opts = {},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
-- https://github.com/simrat39/symbols-outline.nvim
|
-- https://github.com/simrat39/symbols-outline.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
"simrat39/symbols-outline.nvim",
|
"simrat39/symbols-outline.nvim",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
-- https://github.com/nvim-telescope/telescope.nvim
|
-- https://github.com/nvim-telescope/telescope.nvim
|
||||||
local window = require("symbols.window")
|
local window = require("symbols.window")
|
||||||
-- TODO: Ensure installed ripgrep
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
@ -14,9 +15,7 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function()
|
opts = {
|
||||||
require("telescope").setup({
|
|
||||||
|
|
||||||
pickers = {
|
pickers = {
|
||||||
find_files = {
|
find_files = {
|
||||||
hidden = true,
|
hidden = true,
|
||||||
|
@ -43,22 +42,8 @@ return {
|
||||||
require("telescope.themes").get_dropdown(),
|
require("telescope.themes").get_dropdown(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
|
init = function()
|
||||||
-- HACK: Workaround until new borders are fixed in telescope
|
|
||||||
vim.api.nvim_create_autocmd("User", {
|
|
||||||
pattern = "TelescopeFindPre",
|
|
||||||
callback = function()
|
|
||||||
vim.opt_local.winborder = "none"
|
|
||||||
vim.api.nvim_create_autocmd("WinLeave", {
|
|
||||||
once = true,
|
|
||||||
callback = function()
|
|
||||||
vim.opt_local.winborder = window.border
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
require("telescope").load_extension("fzf")
|
require("telescope").load_extension("fzf")
|
||||||
require("telescope").load_extension("ui-select")
|
require("telescope").load_extension("ui-select")
|
||||||
|
|
||||||
|
@ -93,5 +78,19 @@ return {
|
||||||
vim.keymap.set("n", "<leader>sn", function()
|
vim.keymap.set("n", "<leader>sn", function()
|
||||||
require("telescope.builtin").find_files({ cwd = vim.fn.stdpath("config") })
|
require("telescope.builtin").find_files({ cwd = vim.fn.stdpath("config") })
|
||||||
end, { desc = "Neovim files" })
|
end, { desc = "Neovim files" })
|
||||||
|
|
||||||
|
-- HACK: Workaround until new borders are fixed in telescope
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "TelescopeFindPre",
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.winborder = "none"
|
||||||
|
vim.api.nvim_create_autocmd("WinLeave", {
|
||||||
|
once = true,
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.winborder = window.border
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
-- https://github.com/folke/todo-comments.nvim
|
-- https://github.com/folke/todo-comments.nvim
|
||||||
local diagnostic = require("symbols.diagnostic")
|
local diagnostic = require("symbols.diagnostic")
|
||||||
|
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
-- 'folke/todo-comments.nvim',
|
-- 'folke/todo-comments.nvim',
|
||||||
-- NOTE: This fork highlights the entire matched word, not just the keyword.
|
-- NOTE: This fork highlights the entire matched word, not just the keyword.
|
||||||
|
@ -8,25 +10,7 @@ return {
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
opts = {
|
||||||
vim.keymap.set("n", "]t", function()
|
|
||||||
require("todo-comments").jump_next()
|
|
||||||
end, { desc = "Next todo comment" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "[t", function()
|
|
||||||
require("todo-comments").jump_prev()
|
|
||||||
end, { desc = "Previous todo comment" })
|
|
||||||
|
|
||||||
if pcall(require, "trouble") then
|
|
||||||
-- TODO: Use cwd to only show todo's in the current file
|
|
||||||
-- vim.keymap.set("n", "<F4>", "<cmd>TroubleToggle todo cwd=%<cr>", { desc = "Next todo comment" })
|
|
||||||
vim.keymap.set("n", "<F4>", "<cmd>TroubleToggle todo<cr>", { desc = "Next todo comment" })
|
|
||||||
end
|
|
||||||
if pcall(require, "telescope") then
|
|
||||||
vim.keymap.set("n", "<leader>st", "<cmd>TodoTelescope<cr>", { desc = "Search todo" })
|
|
||||||
end
|
|
||||||
|
|
||||||
require("todo-comments").setup({
|
|
||||||
keywords = {
|
keywords = {
|
||||||
-- FIX: Fix
|
-- FIX: Fix
|
||||||
FIX = { icon = diagnostic.bug },
|
FIX = { icon = diagnostic.bug },
|
||||||
|
@ -60,6 +44,23 @@ return {
|
||||||
test = { "TodoCommentTest" },
|
test = { "TodoCommentTest" },
|
||||||
default = { "TodoCommentDefault" },
|
default = { "TodoCommentDefault" },
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
|
init = function()
|
||||||
|
vim.keymap.set("n", "]t", function()
|
||||||
|
require("todo-comments").jump_next()
|
||||||
|
end, { desc = "Next todo comment" })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "[t", function()
|
||||||
|
require("todo-comments").jump_prev()
|
||||||
|
end, { desc = "Previous todo comment" })
|
||||||
|
|
||||||
|
if pcall(require, "trouble") then
|
||||||
|
-- TODO: Use cwd to only show todo's in the current file
|
||||||
|
-- vim.keymap.set("n", "<F4>", "<cmd>TroubleToggle todo cwd=%<cr>", { desc = "Next todo comment" })
|
||||||
|
vim.keymap.set("n", "<F4>", "<cmd>TroubleToggle todo<cr>", { desc = "Next todo comment" })
|
||||||
|
end
|
||||||
|
if pcall(require, "telescope") then
|
||||||
|
vim.keymap.set("n", "<leader>st", "<cmd>TodoTelescope<cr>", { desc = "Search todo" })
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
-- https://github.com/nvim-treesitter/nvim-treesitter
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
-- Highlight, edit, and navigate code
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "nvim-treesitter/nvim-treesitter-textobjects", branch = "master" },
|
{ "nvim-treesitter/nvim-treesitter-textobjects", branch = "master" },
|
||||||
|
@ -10,6 +12,8 @@ return {
|
||||||
branch = "master",
|
branch = "master",
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
main = "nvim-treesitter.configs",
|
main = "nvim-treesitter.configs",
|
||||||
|
--- @module "nvim-treesitter"
|
||||||
|
--- @type TSConfig
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = require("tools.highlight"),
|
ensure_installed = require("tools.highlight"),
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,21 @@
|
||||||
-- https://github.com/folke/trouble.nvim
|
-- https://github.com/folke/trouble.nvim
|
||||||
local fold = require("symbols.fold")
|
local fold = require("symbols.fold")
|
||||||
|
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
cmd = { "Trouble", "TroubleToggle" },
|
cmd = { "Trouble", "TroubleToggle" },
|
||||||
keys = {
|
keys = {
|
||||||
{ "<F3>", "<cmd>TroubleToggle workspace_diagnostics<cr>", desc = "Goto previous buffer" },
|
{ "<F3>", "<cmd>TroubleToggle workspace_diagnostics<cr>", desc = "Goto previous buffer" },
|
||||||
},
|
},
|
||||||
config = function()
|
--- @module "trouble"
|
||||||
require("trouble").setup({
|
--- @type trouble.Config
|
||||||
|
opts = {
|
||||||
icons = false,
|
icons = false,
|
||||||
auto_close = true,
|
auto_close = true,
|
||||||
fold_open = fold.open, -- icon used for open folds
|
fold_open = fold.open, -- icon used for open folds
|
||||||
fold_closed = fold.close, -- icon used for closed folds
|
fold_closed = fold.close, -- icon used for closed folds
|
||||||
use_diagnostic_signs = true,
|
use_diagnostic_signs = true,
|
||||||
})
|
},
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
-- https://github.com/mbbill/undotree
|
-- https://github.com/mbbill/undotree
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
'mbbill/undotree',
|
"mbbill/undotree",
|
||||||
keys = {
|
keys = {
|
||||||
{ '<F6>', vim.cmd.UndotreeToggle, desc = 'Toggle undotree' },
|
{ "<F6>", vim.cmd.UndotreeToggle, desc = "Toggle undotree" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,18 @@
|
||||||
-- https://github.com/folke/which-key.nvim
|
-- https://github.com/folke/which-key.nvim
|
||||||
|
local window = require("symbols.window")
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
|
--- @module "which-key"
|
||||||
|
--- @type wk.Opts
|
||||||
opts = {
|
opts = {
|
||||||
preset = "modern",
|
preset = "modern",
|
||||||
delay = function(ctx)
|
delay = function(ctx)
|
||||||
return ctx.plugin and 0 or 500
|
return ctx.plugin and 0 or 500
|
||||||
end,
|
end,
|
||||||
win = {
|
win = {
|
||||||
border = "single",
|
border = window.border,
|
||||||
padding = { 1, 1 },
|
padding = { 1, 1 },
|
||||||
title = false,
|
title = false,
|
||||||
},
|
},
|
||||||
|
@ -45,7 +50,6 @@ return {
|
||||||
sort = { "alphanum" },
|
sort = { "alphanum" },
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
-- TODO: Only make a category show up if there actually are any keybinds under it
|
|
||||||
require("which-key").add({
|
require("which-key").add({
|
||||||
{ "<leader>b", group = "Buffer" },
|
{ "<leader>b", group = "Buffer" },
|
||||||
{ "<leader>d", group = "Doument" },
|
{ "<leader>d", group = "Doument" },
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
-- https://github.com/ellisonleao/gruvbox.nvim
|
-- https://github.com/ellisonleao/gruvbox.nvim
|
||||||
|
--- @module "lazy"
|
||||||
|
--- @type LazySpec
|
||||||
return {
|
return {
|
||||||
"ellisonleao/gruvbox.nvim",
|
"ellisonleao/gruvbox.nvim",
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user