Compare commits

..

14 Commits

27 changed files with 329 additions and 227 deletions

View File

@ -5,26 +5,23 @@
"conform.nvim": { "branch": "master", "commit": "6feb2f28f9a9385e401857b21eeac3c1b66dd628" }, "conform.nvim": { "branch": "master", "commit": "6feb2f28f9a9385e401857b21eeac3c1b66dd628" },
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"gitsigns.nvim": { "branch": "main", "commit": "8b729e489f1475615dc6c9737da917b3bc163605" }, "gitsigns.nvim": { "branch": "main", "commit": "8bdaccdb897945a3c99c1ad8df94db0ddf5c8790" },
"gruvbox.nvim": { "branch": "main", "commit": "00e38a379bab3389e187b3953566d67d494dfddd" }, "gruvbox.nvim": { "branch": "main", "commit": "00e38a379bab3389e187b3953566d67d494dfddd" },
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
"inc-rename.nvim": { "branch": "main", "commit": "2eaff20526ff6101337b84f4b0d238c11f47d7f4" }, "inc-rename.nvim": { "branch": "main", "commit": "2eaff20526ff6101337b84f4b0d238c11f47d7f4" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "kubernetes.nvim": { "branch": "main", "commit": "44daf998345628a1a7034e3aaa31f4e05e4dde7c" },
"kubernetes.nvim": { "branch": "main", "commit": "1a08abc6c0694f0d1f5d6725bfa7a88daf0f7246" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
"lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" }, "lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" },
"mason-conform.nvim": { "branch": "main", "commit": "f3b96fa2217fcb1513301eefbe10ea0e765e33eb" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "67da97f8c2fd12d05427bb485ce07ee6418e0a51" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "d3ada78a941ff09d21dd9b4c2ec36f0cf44a4ccb" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "75d60a8f928decd8b38897f80849768b7c540a5b" },
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
"neo-tree.nvim": { "branch": "main", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" }, "neo-tree.nvim": { "branch": "main", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
"nui.nvim": { "branch": "main", "commit": "7cd18e73cfbd70e1546931b7268b3eebaeff9391" }, "nui.nvim": { "branch": "main", "commit": "7cd18e73cfbd70e1546931b7268b3eebaeff9391" },
"nvim-bufdel": { "branch": "main", "commit": "523d58e94e7212fff3e05c247b962dc8f93bcfde" },
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" }, "nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
"nvim-dap": { "branch": "master", "commit": "b0f983507e3702f073bfe1516846e58b56d4e42f" }, "nvim-dap": { "branch": "master", "commit": "b0f983507e3702f073bfe1516846e58b56d4e42f" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
"nvim-lspconfig": { "branch": "master", "commit": "b8e7957bde4cbb3cb25a13a62548f7c273b026e9" }, "nvim-lspconfig": { "branch": "master", "commit": "03bc581e05e81d33808b42b2d7e76d70adb3b595" },
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" }, "nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" },
@ -33,12 +30,14 @@
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"ros-nvim": { "branch": "main", "commit": "f0e16eebe68546025784593fa2355ca6749014a0" }, "ros-nvim": { "branch": "main", "commit": "f0e16eebe68546025784593fa2355ca6749014a0" },
"schema-companion.nvim": { "branch": "main", "commit": "7d662b6c1497fdd82e3e8836eb122f5c4b0d8277" }, "schema-companion.nvim": { "branch": "main", "commit": "7d662b6c1497fdd82e3e8836eb122f5c4b0d8277" },
"schemastore.nvim": { "branch": "main", "commit": "0098dde21296a454ae1426f9ac47340dd38c27ce" }, "schemastore.nvim": { "branch": "main", "commit": "59d6bfa8c109675065f68a81664c17557cc19a9c" },
"smart-splits.nvim": { "branch": "master", "commit": "5ef94ca23b28148187846fc46f10184aad4d17b0" }, "scrollEOF.nvim": { "branch": "master", "commit": "2575109749b4bf3a0bf979a17947b3c1e8c5137e" },
"smart-splits.nvim": { "branch": "master", "commit": "5aa2dd82d56cde2f01aef4e902c961e2f7a5453e" },
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
"todo-comments.nvim": { "branch": "main", "commit": "f8bd47e4bc15e3aa7c784b12e68b6dd6e97caea2" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "b24b97c538b71b6de0ce9d84e47df27b6ecafd76" }, "ultimate-autopair.nvim": { "branch": "v0.6", "commit": "b24b97c538b71b6de0ce9d84e47df27b6ecafd76" },
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" }, "undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },

View File

@ -3,8 +3,8 @@
--- @type LazySpec --- @type LazySpec
return { return {
"saghen/blink.cmp", "saghen/blink.cmp",
-- optional: provides snippets for the snippet source
dependencies = { "rafamadriz/friendly-snippets" }, dependencies = { "rafamadriz/friendly-snippets" },
event = "InsertEnter",
-- use a release tag to download pre-built binaries -- use a release tag to download pre-built binaries
version = "1.*", version = "1.*",
@ -12,8 +12,6 @@ return {
--- @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
-- keymap = { preset = "default" },
keymap = { keymap = {
preset = "default", preset = "default",
["<C-space>"] = { "show", "show_documentation", "hide_documentation" }, ["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
@ -42,17 +40,13 @@ return {
["<C-p>"] = { "select_prev", "fallback_to_mappings" }, ["<C-p>"] = { "select_prev", "fallback_to_mappings" },
["<C-n>"] = { "select_next", "fallback_to_mappings" }, ["<C-n>"] = { "select_next", "fallback_to_mappings" },
-- TODO: Does not appear to work?
["<C-k>"] = { "show_signature", "hide_signature", "fallback" }, ["<C-k>"] = { "show_signature", "hide_signature", "fallback" },
}, },
appearance = { appearance = {
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' nerd_font_variant = "normal",
-- Adjusts spacing to ensure icons are aligned
nerd_font_variant = "mono",
}, },
-- (Default) Only show the documentation popup when manually triggered
completion = { completion = {
ghost_text = { ghost_text = {
enabled = true, enabled = true,
@ -60,9 +54,6 @@ return {
list = { list = {
selection = { selection = {
preselect = false, preselect = false,
-- preselect = function(ctx)
-- return vim.bo.filetype ~= "markdown"
-- end,
}, },
}, },
documentation = { documentation = {
@ -97,8 +88,6 @@ return {
}, },
}, },
-- Default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, due to `opts_extend`
sources = { sources = {
default = { default = {
"lazydev", "lazydev",
@ -111,17 +100,15 @@ return {
lazydev = { lazydev = {
name = "LazyDev", name = "LazyDev",
module = "lazydev.integrations.blink", module = "lazydev.integrations.blink",
-- make lazydev completions top priority (see `:h blink.cmp`)
score_offset = 100, score_offset = 100,
}, },
}, },
}, },
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance cmdline = {
-- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation, enabled = false,
-- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"` },
--
-- See the fuzzy documentation for more information
fuzzy = { implementation = "prefer_rust_with_warning" }, fuzzy = { implementation = "prefer_rust_with_warning" },
}, },
opts_extend = { "sources.default" }, opts_extend = { "sources.default" },

View File

@ -1,25 +0,0 @@
-- https://github.com/ojroques/nvim-bufdel
--- @module "lazy"
--- @type LazySpec
return {
"ojroques/nvim-bufdel",
cmd = { "BufDel", "BuffDelOthers" },
keys = {
{
"<leader>bd",
function()
require("bufdel").delete_buffer_expr(nil, false)
end,
silent = true,
desc = "Buffer delete",
},
{
"<leader>bD",
function()
require("bufdel").delete_buffer_others(false)
end,
silent = true,
desc = "Buffer delete others",
},
},
}

View File

@ -3,7 +3,6 @@
--- @type LazySpec --- @type LazySpec
return { return {
"NvChad/nvim-colorizer.lua", "NvChad/nvim-colorizer.lua",
event = "VeryLazy",
opts = { opts = {
lazy_load = true, lazy_load = true,
filetypes = { filetypes = {

View File

@ -3,6 +3,7 @@
--- @type LazySpec --- @type LazySpec
return { return {
{ {
enabled = false,
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
config = function() config = function()
local dap = require("dap") local dap = require("dap")
@ -88,6 +89,7 @@ return {
end, end,
}, },
{ {
enabled = false,
"theHamsta/nvim-dap-virtual-text", "theHamsta/nvim-dap-virtual-text",
dependencies = { dependencies = {
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",

View File

@ -3,6 +3,7 @@
--- @type LazySpec --- @type LazySpec
return { return {
"j-hui/fidget.nvim", "j-hui/fidget.nvim",
event = "LspAttach",
opts = { opts = {
notification = { notification = {
window = { window = {

View File

@ -4,7 +4,7 @@
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", event = { "BufWritePost", "BufReadPre" },
--- @module "gitsigns" --- @module "gitsigns"
--- @type Gitsigns.Config --- @type Gitsigns.Config
opts = { opts = {
@ -32,30 +32,42 @@ return {
}, },
}, },
init = function() init = function()
local ga = require("gitsigns.actions") vim.keymap.set("n", "gs", function()
require("gitsigns.actions").stage_hunk()
vim.keymap.set("n", "gs", ga.stage_hunk, { desc = "(Un)stage hunk" }) end, { desc = "(Un)stage hunk" })
vim.keymap.set("n", "gS", ga.stage_buffer, { desc = "Stage buffer" }) vim.keymap.set("n", "gS", function()
require("gitsigns.actions").stage_buffer()
end, { desc = "Stage buffer" })
vim.keymap.set("v", "gs", function() vim.keymap.set("v", "gs", function()
ga.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) require("gitsigns.actions").stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
end, { desc = "(Un)stage selection" }) end, { desc = "(Un)stage selection" })
vim.keymap.set("n", "gd", ga.preview_hunk, { desc = "Diff hunk" }) vim.keymap.set("n", "gd", function()
require("gitsigns.actions").preview_hunk()
end, { desc = "Diff hunk" })
vim.keymap.set("n", "<leader>tb", ga.toggle_current_line_blame, { desc = "Line blame" }) vim.keymap.set("n", "<leader>tb", function()
vim.keymap.set("n", "gb", ga.blame_line, { desc = "View blame" }) require("gitsigns.actions").toggle_current_line_blame()
end, { desc = "Line blame" })
vim.keymap.set("n", "gb", function()
require("gitsigns.actions").blame_line()
end, { desc = "View blame" })
vim.keymap.set("n", "<leader>gr", ga.reset_hunk, { desc = "Reset hunk" }) vim.keymap.set("n", "<leader>gr", function()
vim.keymap.set("n", "<leader>gR", ga.reset_buffer, { desc = "Reset buffer" }) require("gitsigns.actions").reset_hunk()
end, { desc = "Reset hunk" })
vim.keymap.set("n", "<leader>gR", function()
require("gitsigns.actions").reset_buffer()
end, { desc = "Reset buffer" })
vim.keymap.set("v", "<leader>gr", function() vim.keymap.set("v", "<leader>gr", function()
ga.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) require("gitsigns.actions").reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
end, { desc = "Git reset selection" }) end, { desc = "Git reset selection" })
vim.keymap.set("n", "]g", function() vim.keymap.set("n", "]g", function()
ga.nav_hunk("next") require("gitsigns.actions").nav_hunk("next")
end, { desc = "Next hunk" }) end, { desc = "Next hunk" })
vim.keymap.set("n", "[g", function() vim.keymap.set("n", "[g", function()
ga.nav_hunk("prev") require("gitsigns.actions").nav_hunk("prev")
end, { desc = "Previous hunk" }) end, { desc = "Previous hunk" })
end, end,
} }

View File

@ -3,6 +3,8 @@
--- @type LazySpec --- @type LazySpec
return { return {
"NMAC427/guess-indent.nvim", "NMAC427/guess-indent.nvim",
cmd = "GuessIndent",
event = { "BufReadPre" },
--- @module "guess-indent" --- @module "guess-indent"
--- @type GuessIndentConfig --- @type GuessIndentConfig
opts = {}, opts = {},

View File

@ -3,6 +3,9 @@
--- @type LazySpec --- @type LazySpec
return { return {
"smjonas/inc-rename.nvim", "smjonas/inc-rename.nvim",
cmd = "IncRename",
-- We can't load on just the command otherwise the preview does not work
event = "LspAttach",
--- @module "inc_rename" --- @module "inc_rename"
--- @type inc_rename.UserConfig --- @type inc_rename.UserConfig
opts = { opts = {

View File

@ -1,18 +0,0 @@
-- https://github.com/lukas-reineke/indent-blankline.nvim
--- @module "lazy"
--- @type LazySpec
return {
-- Add indentation guides even on blank lines
"lukas-reineke/indent-blankline.nvim",
-- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help indent_blankline.txt`
main = "ibl",
---@module "ibl"
---@type ibl.config
opts = {
indent = {
char = "¦",
},
scope = { enabled = true, show_start = false, show_end = false },
},
}

View File

@ -3,6 +3,7 @@
--- @type LazySpec --- @type LazySpec
return { return {
"diogo464/kubernetes.nvim", "diogo464/kubernetes.nvim",
ft = "yaml",
opts = { opts = {
schema_strict = true, schema_strict = true,
schema_generate_always = false, schema_generate_always = false,

View File

@ -3,4 +3,5 @@
--- @type LazySpec --- @type LazySpec
return { return {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
cmd = { "LspInfo", "LspStart", "LspStop", "LspRestart" },
} }

View File

@ -1,6 +1,10 @@
-- https://github.com/nvim-lualine/lualine.nvim -- https://github.com/nvim-lualine/lualine.nvim
local function get_schema() local function get_schema()
if vim.bo.filetype ~= "yaml" then
return ""
end
local schema = require("schema-companion.context").get_buffer_schema() local schema = require("schema-companion.context").get_buffer_schema()
if schema.name == "none" then if schema.name == "none" then
return "" return ""

View File

@ -3,7 +3,8 @@
--- @type LazySpec --- @type LazySpec
return { return {
"mason-org/mason-lspconfig.nvim", "mason-org/mason-lspconfig.nvim",
event = "VeryLazy", cmd = { "LspInstall", "LspUninstall" },
event = { "BufNewFile", "BufReadPre" },
--- @module "mason-lspconfig" --- @module "mason-lspconfig"
--- @type MasonLspconfigSettings --- @type MasonLspconfigSettings
opts = {}, opts = {},

View File

@ -36,6 +36,5 @@ return {
ensure_installed = ensure_installed, ensure_installed = ensure_installed,
auto_update = true, auto_update = true,
debounde_hours = 24, debounde_hours = 24,
start_delay = 1000,
}, },
} }

View File

@ -3,6 +3,7 @@
--- @type LazySpec --- @type LazySpec
return { return {
"mason-org/mason.nvim", "mason-org/mason.nvim",
cmd = { "Mason", "MasonUpdate", "MasonInstall", "MasonUninstall", "MasonUninstallAll", "MasonLog" },
--- @module "mason" --- @module "mason"
--- @type MasonSettings --- @type MasonSettings
opts = {}, opts = {},

View File

@ -2,14 +2,17 @@
--- @module "lazy" --- @module "lazy"
--- @type LazySpec --- @type LazySpec
return { return {
"tadachs/ros-nvim", -- "tadachs/ros-nvim",
"DreadedX/ros-nvim",
event = { "BufRead", "BufNewFile" },
opts = { opts = {
only_workspace = true, commands = {
enabled = false,
},
}, },
build = ":TSInstall ros", build = ":TSInstall ros",
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
"nvim-telescope/telescope.nvim",
}, },
} }

View File

@ -38,14 +38,16 @@ return {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
"diogo464/kubernetes.nvim", "diogo464/kubernetes.nvim",
}, },
init = function() keys = {
vim.keymap.set( {
"n",
"<leader>ys", "<leader>ys",
require("telescope").extensions.schema_companion.select_schema, function()
{ desc = "Yaml schema" } require("telescope").extensions.schema_companion.select_schema()
)
end, end,
desc = "Yaml schema",
ft = "yaml",
},
},
--- @module "schema-companion" --- @module "schema-companion"
--- @type schema_companion.Config --- @type schema_companion.Config
opts = { opts = {

View File

@ -3,4 +3,5 @@
--- @type LazySpec --- @type LazySpec
return { return {
"b0o/schemastore.nvim", "b0o/schemastore.nvim",
lazy = true,
} }

View File

@ -0,0 +1,8 @@
-- https://github.com/Aasim-A/scrollEOF.nvim
--- @module "lazy"
--- @type LazySpec
return {
"Aasim-A/scrollEOF.nvim",
event = { "CursorMoved", "WinScrolled" },
opts = {},
}

View File

@ -3,24 +3,51 @@
--- @type LazySpec --- @type LazySpec
return { return {
"mrjones2014/smart-splits.nvim", "mrjones2014/smart-splits.nvim",
event = "VeryLazy",
--- @module "smart-splits"
--- @type SmartSplitsConfig
opts = { opts = {
at_edge = "stop", at_edge = "stop",
cursor_follows_swapped_bufs = true, cursor_follows_swapped_bufs = true,
}, },
init = function() init = function()
vim.keymap.set("n", "<M-h>", require("smart-splits").move_cursor_left) vim.keymap.set("n", "<M-h>", function()
vim.keymap.set("n", "<M-j>", require("smart-splits").move_cursor_down) require("smart-splits").move_cursor_left()
vim.keymap.set("n", "<M-k>", require("smart-splits").move_cursor_up) end)
vim.keymap.set("n", "<M-l>", require("smart-splits").move_cursor_right) vim.keymap.set("n", "<M-j>", function()
require("smart-splits").move_cursor_down()
end)
vim.keymap.set("n", "<M-k>", function()
require("smart-splits").move_cursor_up()
end)
vim.keymap.set("n", "<M-l>", function()
require("smart-splits").move_cursor_right()
end)
vim.keymap.set("n", "<C-w>h", require("smart-splits").swap_buf_left, { desc = "Swap buffer to the left" }) vim.keymap.set("n", "<C-w>h", function()
vim.keymap.set("n", "<C-w>j", require("smart-splits").swap_buf_down, { desc = "Swap buffer to the bottom" }) require("smart-splits").swap_buf_left()
vim.keymap.set("n", "<C-w>k", require("smart-splits").swap_buf_up, { desc = "Swap buffer to the top" }) end, { desc = "Swap buffer to the left" })
vim.keymap.set("n", "<C-w>l", require("smart-splits").swap_buf_right, { desc = "Swap buffer to the right" }) vim.keymap.set("n", "<C-w>j", function()
require("smart-splits").swap_buf_down()
end, { desc = "Swap buffer to the bottom" })
vim.keymap.set("n", "<C-w>k", function()
require("smart-splits").swap_buf_up()
end, { desc = "Swap buffer to the top" })
vim.keymap.set("n", "<C-w>l", function()
require("smart-splits").swap_buf_right()
end, { desc = "Swap buffer to the right" })
vim.keymap.set("n", "<M-left>", require("smart-splits").resize_left, { desc = "Resize buffer to the left" }) vim.keymap.set("n", "<M-left>", function()
vim.keymap.set("n", "<M-down>", require("smart-splits").resize_down, { desc = "Resize buffer to the bottom" }) require("smart-splits").resize_left()
vim.keymap.set("n", "<M-up>", require("smart-splits").resize_up, { desc = "Resize buffer to the top" }) end, { desc = "Resize buffer to the left" })
vim.keymap.set("n", "<M-right>", require("smart-splits").resize_right, { desc = "Resize buffer to the right" }) vim.keymap.set("n", "<M-down>", function()
require("smart-splits").resize_down()
end, { desc = "Resize buffer to the bottom" })
vim.keymap.set("n", "<M-up>", function()
require("smart-splits").resize_up()
end, { desc = "Resize buffer to the top" })
vim.keymap.set("n", "<M-right>", function()
require("smart-splits").resize_right()
end, { desc = "Resize buffer to the right" })
end, end,
} }

View File

@ -0,0 +1,73 @@
-- https://github.com/folke/snacks.nvim
--- @module "lazy"
--- @type LazySpec
return {
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
--- @module "snacks"
--- @type snacks.Config
opts = {
bigfile = {
enabled = true,
---@param ctx {buf: number, ft:string}
setup = function(ctx)
-- Disable treesitter
vim.treesitter.stop(ctx.buf)
vim.schedule(function()
if vim.api.nvim_buf_is_valid(ctx.buf) then
vim.bo[ctx.buf].syntax = ctx.ft
end
end)
end,
},
indent = {
enabled = true,
indent = {
char = "¦",
},
animate = {
enabled = false,
},
scope = {
char = "¦",
only_current = true,
},
},
},
keys = {
{
"<leader>bd",
function()
Snacks.bufdelete.delete()
end,
silent = true,
desc = "Buffer delete",
},
{
"<leader>bD",
function()
Snacks.bufdelete.other()
end,
silent = true,
desc = "Buffer delete others",
},
},
},
{
"nvim-neo-tree/neo-tree.nvim",
opts = function(_, opts)
local function on_move(data)
Snacks.rename.on_rename_file(data.source, data.destination)
end
local events = require("neo-tree.events")
opts.event_handlers = opts.event_handlers or {}
vim.list_extend(opts.event_handlers, {
{ event = events.FILE_MOVED, handler = on_move },
{ event = events.FILE_RENAMED, handler = on_move },
})
end,
},
}

View File

@ -1,17 +0,0 @@
-- https://github.com/simrat39/symbols-outline.nvim
--- @module "lazy"
--- @type LazySpec
return {
enabled = false,
"simrat39/symbols-outline.nvim",
keys = {
{
"<F5>",
function()
require("symbols-outline").toggle_outline()
end,
desc = "Toggle symbols outline",
},
},
opts = {},
}

View File

@ -3,19 +3,15 @@ local window = require("symbols.window")
--- @module "lazy" --- @module "lazy"
--- @type LazySpec --- @type LazySpec
return { return {
{
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
cmd = { "Telescope" },
lazy = false,
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"nvim-telescope/telescope-ui-select.nvim",
{
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",
cond = function()
return vim.fn.executable("make") == 1
end,
}, },
}, opts = function()
opts = { return {
pickers = { pickers = {
find_files = { find_files = {
hidden = true, hidden = true,
@ -42,13 +38,18 @@ return {
require("telescope.themes").get_dropdown(), require("telescope.themes").get_dropdown(),
}, },
}, },
}, }
end,
config = function(plugin, opts)
require("telescope").setup(opts)
end,
init = function() init = function()
require("telescope").load_extension("fzf") vim.keymap.set("n", "<leader>.", function()
require("telescope").load_extension("ui-select") require("telescope.builtin").oldfiles()
end, { desc = "Find recently opened files" })
vim.keymap.set("n", "<leader>.", require("telescope.builtin").oldfiles, { desc = "Find recently opened files" }) vim.keymap.set("n", "<leader>sb", function()
vim.keymap.set("n", "<leader>sb", require("telescope.builtin").buffers, { desc = "Buffers" }) require("telescope.builtin").buffers()
end, { desc = "Buffers" })
vim.keymap.set("n", "<leader>/", function() vim.keymap.set("n", "<leader>/", function()
require("telescope.builtin").current_buffer_fuzzy_find({ require("telescope.builtin").current_buffer_fuzzy_find({
@ -63,18 +64,30 @@ return {
}) })
end, { desc = "Grep in open files" }) end, { desc = "Grep in open files" })
vim.keymap.set("n", "<leader><space>", require("telescope.builtin").find_files, { desc = "Find files" }) vim.keymap.set("n", "<leader><space>", function()
vim.keymap.set("n", "<leader>sh", require("telescope.builtin").help_tags, { desc = "Help" }) require("telescope.builtin").find_files()
end, { desc = "Find files" })
vim.keymap.set("n", "<leader>sh", function()
require("telescope.builtin").help_tags()
end, { desc = "Help" })
vim.keymap.set("n", "<leader>sw", function() vim.keymap.set("n", "<leader>sw", function()
require("telescope.builtin").grep_string({ require("telescope.builtin").grep_string({
-- Show matches in the order they appear in the document -- Show matches in the order they appear in the document
sorting_strategy = "ascending", sorting_strategy = "ascending",
}) })
end, { desc = "Current word" }) end, { desc = "Current word" })
vim.keymap.set("n", "<leader>sg", require("telescope.builtin").live_grep, { desc = "Grep" }) vim.keymap.set("n", "<leader>sg", function()
vim.keymap.set("n", "<leader>sd", require("telescope.builtin").diagnostics, { desc = "Diagnostics" }) require("telescope.builtin").live_grep()
vim.keymap.set("n", "<leader>sr", require("telescope.builtin").resume, { desc = "Resume" }) end, { desc = "Grep" })
vim.keymap.set("n", "<leader>sk", require("telescope.builtin").keymaps, { desc = "Keymaps" }) vim.keymap.set("n", "<leader>sd", function()
require("telescope.builtin").diagnostics()
end, { desc = "Diagnostics" })
vim.keymap.set("n", "<leader>sr", function()
require("telescope.builtin").resume()
end, { desc = "Resume" })
vim.keymap.set("n", "<leader>sk", function()
require("telescope.builtin").keymaps()
end, { desc = "Keymaps" })
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" })
@ -93,4 +106,27 @@ return {
end, end,
}) })
end, end,
},
{
"nvim-telescope/telescope-ui-select.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
},
config = function()
require("telescope").load_extension("ui-select")
end,
},
{
"nvim-telescope/telescope-fzf-native.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
},
build = "make",
cond = function()
return vim.fn.executable("make") == 1
end,
config = function()
require("telescope").load_extension("fzf")
end,
},
} }

View File

@ -8,6 +8,7 @@ return {
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
}, },
event = "VeryLazy",
opts = { opts = {
keywords = { keywords = {
-- FIX: Fix -- FIX: Fix
@ -52,13 +53,12 @@ return {
require("todo-comments").jump_prev() require("todo-comments").jump_prev()
end, { desc = "Previous todo comment" }) end, { desc = "Previous todo comment" })
if pcall(require, "trouble") then -- -- TODO: Use cwd to only show todo's in the current file
-- 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 cwd=%<cr>", { desc = "Next todo comment" }) -- vim.keymap.set("n", "<F4>", "<cmd>TroubleToggle todo<cr>", { desc = "Next todo comment" })
vim.keymap.set("n", "<F4>", "<cmd>TroubleToggle todo<cr>", { desc = "Next todo comment" })
end vim.keymap.set("n", "<leader>st", function()
if pcall(require, "telescope") then require("telescope").extensions["todo-comments"].todo()
vim.keymap.set("n", "<leader>st", "<cmd>TodoTelescope<cr>", { desc = "Search todo" }) end, { desc = "Search todo" })
end
end, end,
} }

View File

@ -4,6 +4,7 @@ local window = require("symbols.window")
--- @type LazySpec --- @type LazySpec
return { return {
"folke/which-key.nvim", "folke/which-key.nvim",
event = "VeryLazy",
--- @module "which-key" --- @module "which-key"
--- @type wk.Opts --- @type wk.Opts
opts = { opts = {
@ -48,15 +49,13 @@ return {
}, },
expand = 1, expand = 1,
sort = { "alphanum" }, sort = { "alphanum" },
}, spec = {
init = function()
require("which-key").add({
{ "<leader>b", group = "Buffer" }, { "<leader>b", group = "Buffer" },
{ "<leader>d", group = "Doument" }, { "<leader>d", group = "Doument" },
{ "<leader>g", group = "Git" }, { "<leader>g", group = "Git" },
{ "<leader>t", group = "Toggle" }, { "<leader>t", group = "Toggle" },
{ "<leader>s", group = "Search" }, { "<leader>s", group = "Search" },
{ "gr", group = "LSP" }, { "gr", group = "LSP" },
}) },
end, },
} }

View File

@ -75,6 +75,7 @@ return {
DiagnosticNumWarn = { fg = palette.dark0, bg = palette.bright_yellow, bold = true }, DiagnosticNumWarn = { fg = palette.dark0, bg = palette.bright_yellow, bold = true },
DiagnosticNumHint = { fg = palette.dark0, bg = palette.bright_aqua, bold = true }, DiagnosticNumHint = { fg = palette.dark0, bg = palette.bright_aqua, bold = true },
DiagnosticNumInfo = { fg = palette.dark0, bg = palette.bright_blue, bold = true }, DiagnosticNumInfo = { fg = palette.dark0, bg = palette.bright_blue, bold = true },
SnacksIndentScope = { fg = palette.light4 },
}, },
}) })