Compare commits
No commits in common. "cfef8a7ef8d183d0a500c8c64431cc6b925dcaf2" and "c0b2ec9e0153789f125f838ba60710488960452b" have entirely different histories.
cfef8a7ef8
...
c0b2ec9e01
12 changed files with 378 additions and 387 deletions
16
flake.nix
16
flake.nix
|
@ -78,11 +78,9 @@
|
||||||
python312Packages.pylatexenc
|
python312Packages.pylatexenc
|
||||||
fd
|
fd
|
||||||
|
|
||||||
# lsps (minimal because should be provided per-project by nix)
|
# lsps / formatters
|
||||||
|
lua-language-server
|
||||||
nixd
|
nixd
|
||||||
tinymist
|
|
||||||
|
|
||||||
# formatters
|
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
nodePackages_latest.prettier
|
nodePackages_latest.prettier
|
||||||
taplo
|
taplo
|
||||||
|
@ -91,6 +89,7 @@
|
||||||
black
|
black
|
||||||
stylua
|
stylua
|
||||||
marksman
|
marksman
|
||||||
|
tinymist
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -140,6 +139,7 @@
|
||||||
nvim-autopairs
|
nvim-autopairs
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
intellitab-nvim
|
intellitab-nvim
|
||||||
|
sleuth
|
||||||
which-key-nvim
|
which-key-nvim
|
||||||
telescope-nvim
|
telescope-nvim
|
||||||
markdown-preview-nvim
|
markdown-preview-nvim
|
||||||
|
@ -188,6 +188,7 @@
|
||||||
"vim"
|
"vim"
|
||||||
"vi"
|
"vi"
|
||||||
];
|
];
|
||||||
|
neovim-unwrapped = pkgs.neovim-unwrapped;
|
||||||
};
|
};
|
||||||
categories = {
|
categories = {
|
||||||
general = true;
|
general = true;
|
||||||
|
@ -222,7 +223,12 @@
|
||||||
devShells = {
|
devShells = {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
name = defaultPackageName;
|
name = defaultPackageName;
|
||||||
packages = [ defaultPackage ] ++ (with pkgs; [ lua-language-server ]);
|
packages = [ defaultPackage ];
|
||||||
|
inputsFrom = with pkgs; [
|
||||||
|
lua-language-server
|
||||||
|
stylua
|
||||||
|
];
|
||||||
|
shellHook = '''';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
15
init.lua
15
init.lua
|
@ -21,7 +21,7 @@ vim.opt.foldenable = false
|
||||||
|
|
||||||
vim.cmd.colorscheme("rose-pine")
|
vim.cmd.colorscheme("rose-pine")
|
||||||
|
|
||||||
require("nvim-treesitter.configs").setup({
|
require('nvim-treesitter.configs').setup({
|
||||||
ensure_installed = {},
|
ensure_installed = {},
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
|
@ -35,16 +35,7 @@ require("nvim-treesitter.configs").setup({
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
additional_vim_regex_highlighting = false,
|
additional_vim_regex_highlighting = false
|
||||||
incremental_selection = {
|
|
||||||
enable = true,
|
|
||||||
keymaps = {
|
|
||||||
init_selection = "<CR>",
|
|
||||||
node_incremental = "<C-k>",
|
|
||||||
scope_incremental = "<BS>",
|
|
||||||
node_decremental = "<C-j>",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({
|
vim.api.nvim_create_autocmd({
|
||||||
|
@ -58,6 +49,6 @@ vim.api.nvim_create_autocmd({
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.highlight.on_yank({ higroup = "Visual", timeout = 300 })
|
vim.highlight.on_yank {higroup='Visual', timeout=300}
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -9,6 +9,13 @@ vim.keymap.set("t", "<C-Esc>", "<C-\\><C-n>")
|
||||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>mr", function()
|
||||||
|
vim.cmd.CellularAutomaton("make_it_rain")
|
||||||
|
end)
|
||||||
|
vim.keymap.set("n", "<leader>bruh", function()
|
||||||
|
vim.cmd.CellularAutomaton("game_of_life")
|
||||||
|
end)
|
||||||
|
|
||||||
-- when searching, also center screen and reopen folds
|
-- when searching, also center screen and reopen folds
|
||||||
vim.keymap.set("n", "n", "nzzzv")
|
vim.keymap.set("n", "n", "nzzzv")
|
||||||
vim.keymap.set("n", "N", "Nzzzv")
|
vim.keymap.set("n", "N", "Nzzzv")
|
||||||
|
@ -22,10 +29,33 @@ vim.keymap.set({ "n", "v" }, "<leader>Y", '"+Y', { desc = "yank rest of line to
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>p", '"+p', { desc = "put after cursor from clipboard" })
|
vim.keymap.set({ "n", "v" }, "<leader>p", '"+p', { desc = "put after cursor from clipboard" })
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>P", '"+P', { desc = "put before cursor from clipboard" })
|
vim.keymap.set({ "n", "v" }, "<leader>P", '"+P', { desc = "put before cursor from clipboard" })
|
||||||
|
|
||||||
vim.keymap.set("i", "<Tab>", require("scripts.intellitab").indent)
|
vim.keymap.set("n", "<leader>gg", function()
|
||||||
|
vim.cmd.Neogit()
|
||||||
|
end, { desc = "Open neogit" })
|
||||||
|
vim.keymap.set("n", "<leader>gc", function()
|
||||||
|
vim.cmd.Neogit("kind=floating commit")
|
||||||
|
end, { desc = "Open neogit commit menu" })
|
||||||
|
|
||||||
-- Allow increment/decrement repeatedly in visual
|
vim.keymap.set("n", "<leader>u", function()
|
||||||
vim.keymap.set("v", "<C-a>", "<C-a>gv")
|
vim.cmd.UndotreeToggle()
|
||||||
vim.keymap.set("v", "<C-x>", "<C-x>gv")
|
end, { desc = "Toggle undotree" })
|
||||||
vim.keymap.set("v", "g<C-a>", "g<C-a>gv")
|
|
||||||
vim.keymap.set("v", "g<C-x>", "g<C-x>gv")
|
vim.keymap.set({ "n", "v" }, "<leader>cf", function()
|
||||||
|
require("conform").format({ async = true })
|
||||||
|
end)
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>ctf", function()
|
||||||
|
if vim.g.disable_autoformat then
|
||||||
|
vim.g.disable_autoformat = false
|
||||||
|
else
|
||||||
|
vim.g.disable_autoformat = true
|
||||||
|
end
|
||||||
|
end, { desc = "Disable autoformat on save globally" })
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>cbf", function()
|
||||||
|
if vim.b[0].disable_autoformat then
|
||||||
|
vim.b[0].disable_autoformat = false
|
||||||
|
else
|
||||||
|
vim.b[0].disable_autoformat = true
|
||||||
|
end
|
||||||
|
end, { desc = "Disable autoformat on save buffer" })
|
||||||
|
|
||||||
|
vim.keymap.set("i", "<Tab>", require("scripts.intellitab").indent)
|
||||||
|
|
|
@ -20,6 +20,179 @@ return {
|
||||||
snippet_forward = "<Tab>",
|
snippet_forward = "<Tab>",
|
||||||
snippet_backward = "<S-Tab>",
|
snippet_backward = "<S-Tab>",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
accept = {
|
||||||
|
create_undo_point = true,
|
||||||
|
auto_brackets = {
|
||||||
|
enabled = false,
|
||||||
|
default_brackets = { "(", ")" },
|
||||||
|
override_brackets_for_filetypes = {},
|
||||||
|
-- Overrides the default blocked filetypes
|
||||||
|
force_allow_filetypes = {},
|
||||||
|
blocked_filetypes = {},
|
||||||
|
-- Synchronously use the kind of the item to determine if brackets should be added
|
||||||
|
kind_resolution = {
|
||||||
|
enabled = true,
|
||||||
|
blocked_filetypes = { "typescript", "typescriptreact", "javascript", "javascriptreact", "vue" },
|
||||||
|
},
|
||||||
|
-- Asynchronously use semantic token to determine if brackets should be added
|
||||||
|
semantic_token_resolution = {
|
||||||
|
enabled = true,
|
||||||
|
blocked_filetypes = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
trigger = {
|
||||||
|
completion = {
|
||||||
|
-- regex used to get the text when fuzzy matching
|
||||||
|
-- changing this may break some sources, so please report if you run into issues
|
||||||
|
-- todo: shouldnt this also affect the accept command? should this also be per language?
|
||||||
|
keyword_regex = "[%w_\\-]",
|
||||||
|
-- LSPs can indicate when to show the completion window via trigger characters
|
||||||
|
-- however, some LSPs (*cough* tsserver *cough*) return characters that would essentially
|
||||||
|
-- always show the window. We block these by default
|
||||||
|
blocked_trigger_characters = { " ", "\n", "\t" },
|
||||||
|
-- when true, will show the completion window when the cursor comes after a trigger character when entering insert mode
|
||||||
|
show_on_insert_on_trigger_character = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
signature_help = {
|
||||||
|
enabled = false,
|
||||||
|
blocked_trigger_characters = {},
|
||||||
|
blocked_retrigger_characters = {},
|
||||||
|
-- when true, will show the signature help window when the cursor comes after a trigger character when entering insert mode
|
||||||
|
show_on_insert_on_trigger_character = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
fuzzy = {
|
||||||
|
-- frencency tracks the most recently/frequently used items and boosts the score of the item
|
||||||
|
use_frecency = true,
|
||||||
|
-- proximity bonus boosts the score of items with a value in the buffer
|
||||||
|
use_proximity = true,
|
||||||
|
max_items = 200,
|
||||||
|
-- controls which sorts to use and in which order, these three are currently the only allowed options
|
||||||
|
sorts = { "label", "kind", "score" },
|
||||||
|
|
||||||
|
prebuiltBinaries = {
|
||||||
|
-- Whether or not to automatically download a prebuilt binary from github. If this is set to `false`
|
||||||
|
-- you will need to manually build the fuzzy binary dependencies by running `cargo build --release`
|
||||||
|
download = false,
|
||||||
|
-- When downloading a prebuilt binary force the downloader to resolve this version. If this is uset
|
||||||
|
-- then the downloader will attempt to infer the version from the checked out git tag (if any).
|
||||||
|
--
|
||||||
|
-- Beware that if the FFI ABI changes while tracking main then this may result in blink breaking.
|
||||||
|
forceVersion = nil,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
sources = {
|
||||||
|
-- similar to nvim-cmp's sources, but we point directly to the source's lua module
|
||||||
|
-- multiple groups can be provided, where it'll fallback to the next group if the previous
|
||||||
|
-- returns no completion items
|
||||||
|
-- WARN: This API will have breaking changes during the beta
|
||||||
|
providers = {
|
||||||
|
{
|
||||||
|
{ "blink.cmp.sources.lsp" },
|
||||||
|
{ "blink.cmp.sources.path" },
|
||||||
|
{ "blink.cmp.sources.snippets", score_offset = -3 },
|
||||||
|
},
|
||||||
|
{ { "blink.cmp.sources.buffer" } },
|
||||||
|
},
|
||||||
|
-- FOR REF: full example
|
||||||
|
providers = {
|
||||||
|
{
|
||||||
|
-- all of these properties work on every source
|
||||||
|
{
|
||||||
|
"blink.cmp.sources.lsp",
|
||||||
|
keyword_length = 0,
|
||||||
|
score_offset = 0,
|
||||||
|
trigger_characters = { "f", "o", "o" },
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
-- the follow two sources have additional options
|
||||||
|
{
|
||||||
|
"blink.cmp.sources.path",
|
||||||
|
opts = {
|
||||||
|
trailing_slash = false,
|
||||||
|
label_trailing_slash = true,
|
||||||
|
get_cwd = function(context)
|
||||||
|
return vim.fn.expand(("#%d:p:h"):format(context.bufnr))
|
||||||
|
end,
|
||||||
|
show_hidden_files_by_default = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"blink.cmp.sources.snippets",
|
||||||
|
score_offset = -3,
|
||||||
|
-- similar to https://github.com/garymjr/nvim-snippets
|
||||||
|
opts = {
|
||||||
|
friendly_snippets = true,
|
||||||
|
search_paths = { vim.fn.stdpath("config") .. "/snippets" },
|
||||||
|
global_snippets = { "all" },
|
||||||
|
extended_filetypes = {},
|
||||||
|
ignored_filetypes = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ { "blink.cmp.sources.buffer" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
windows = {
|
||||||
|
autocomplete = {
|
||||||
|
min_width = 30,
|
||||||
|
max_width = 60,
|
||||||
|
max_height = 10,
|
||||||
|
border = "none",
|
||||||
|
winhighlight = "Normal:BlinkCmpMenu,FloatBorder:BlinkCmpMenuBorder,CursorLine:BlinkCmpMenuSelection,Search:None",
|
||||||
|
-- keep the cursor X lines away from the top/bottom of the window
|
||||||
|
scrolloff = 2,
|
||||||
|
-- which directions to show the window,
|
||||||
|
-- falling back to the next direction when there's not enough space
|
||||||
|
direction_priority = { "s", "n" },
|
||||||
|
-- whether to preselect the first item in the completion list
|
||||||
|
preselect = true,
|
||||||
|
-- Controls how the completion items are rendered on the popup window
|
||||||
|
-- 'simple' will render the item's kind icon the left alongside the label
|
||||||
|
-- 'reversed' will render the label on the left and the kind icon + name on the right
|
||||||
|
-- 'function(blink.cmp.CompletionRenderContext): blink.cmp.Component[]' for custom rendering
|
||||||
|
draw = "simple",
|
||||||
|
-- Controls the cycling behavior when reaching the beginning or end of the completion list.
|
||||||
|
cycle = {
|
||||||
|
-- When `true`, calling `select_next` at the *bottom* of the completion list will select the *first* completion item.
|
||||||
|
from_bottom = true,
|
||||||
|
-- When `true`, calling `select_prev` at the *top* of the completion list will select the *last* completion item.
|
||||||
|
from_top = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
documentation = {
|
||||||
|
min_width = 10,
|
||||||
|
max_width = 60,
|
||||||
|
max_height = 20,
|
||||||
|
border = "padded",
|
||||||
|
winhighlight = "Normal:BlinkCmpDoc,FloatBorder:BlinkCmpDocBorder,CursorLine:BlinkCmpDocCursorLine,Search:None",
|
||||||
|
-- which directions to show the documentation window,
|
||||||
|
-- for each of the possible autocomplete window directions,
|
||||||
|
-- falling back to the next direction when there's not enough space
|
||||||
|
direction_priority = {
|
||||||
|
autocomplete_north = { "e", "w", "n", "s" },
|
||||||
|
autocomplete_south = { "e", "w", "s", "n" },
|
||||||
|
},
|
||||||
|
auto_show = true,
|
||||||
|
auto_show_delay_ms = 500,
|
||||||
|
update_delay_ms = 100,
|
||||||
|
},
|
||||||
|
signature_help = {
|
||||||
|
min_width = 1,
|
||||||
|
max_width = 100,
|
||||||
|
max_height = 10,
|
||||||
|
border = "padded",
|
||||||
|
winhighlight = "Normal:BlinkCmpSignatureHelp,FloatBorder:BlinkCmpSignatureHelpBorder",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
ns = vim.api.nvim_create_namespace("blink_cmp"),
|
ns = vim.api.nvim_create_namespace("blink_cmp"),
|
||||||
-- sets the fallback highlight groups to nvim-cmp's highlight groups
|
-- sets the fallback highlight groups to nvim-cmp's highlight groups
|
||||||
|
@ -28,6 +201,10 @@ return {
|
||||||
use_nvim_cmp_as_default = false,
|
use_nvim_cmp_as_default = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||||
|
-- adjusts spacing to ensure icons are aligned
|
||||||
|
nerd_font_variant = "normal",
|
||||||
|
|
||||||
kind_icons = {
|
kind_icons = {
|
||||||
Text = "",
|
Text = "",
|
||||||
Method = "",
|
Method = "",
|
||||||
|
|
|
@ -2,40 +2,6 @@ return {
|
||||||
"conform.nvim",
|
"conform.nvim",
|
||||||
event = "BufWritePre",
|
event = "BufWritePre",
|
||||||
cmd = "ConformInfo",
|
cmd = "ConformInfo",
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>cf",
|
|
||||||
function()
|
|
||||||
require("conform").format({ async = true })
|
|
||||||
end,
|
|
||||||
desc = "Format code",
|
|
||||||
mode = { "n", "v" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>ctf",
|
|
||||||
function()
|
|
||||||
if vim.g.disable_autoformat then
|
|
||||||
vim.g.disable_autoformat = false
|
|
||||||
else
|
|
||||||
vim.g.disable_autoformat = true
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
desc = "Disable autoformat on save globally",
|
|
||||||
mode = { "n", "v" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>cbf",
|
|
||||||
function()
|
|
||||||
if vim.b[0].disable_autoformat then
|
|
||||||
vim.b[0].disable_autoformat = false
|
|
||||||
else
|
|
||||||
vim.b[0].disable_autoformat = true
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
desc = "Disable autoformat on save buffer",
|
|
||||||
mode = { "n", "v" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
after = function()
|
after = function()
|
||||||
require("conform").setup({
|
require("conform").setup({
|
||||||
format_on_save = function(bufnr)
|
format_on_save = function(bufnr)
|
||||||
|
|
|
@ -1,53 +1,23 @@
|
||||||
return {
|
return {
|
||||||
"harpoon2",
|
"harpoon2",
|
||||||
after = function()
|
after = function()
|
||||||
require("harpoon"):setup()
|
local harpoon = require("harpoon")
|
||||||
end,
|
|
||||||
keys = {
|
vim.keymap.set("n", "<leader>a", function()
|
||||||
{
|
harpoon:list():add()
|
||||||
"<leader>a",
|
end)
|
||||||
function()
|
vim.keymap.set("n", "<C-h><C-a>", function()
|
||||||
require("harpoon"):list():add()
|
harpoon:list():select(1)
|
||||||
end,
|
end)
|
||||||
desc = "Add to harpoon",
|
vim.keymap.set("n", "<C-h><C-s>", function()
|
||||||
mode = "n",
|
harpoon:list():select(2)
|
||||||
},
|
end)
|
||||||
{
|
vim.keymap.set("n", "<C-h><C-d>", function()
|
||||||
"<C-h><C-a>",
|
harpoon:list():select(3)
|
||||||
function()
|
end)
|
||||||
require("harpoon"):list():select(1)
|
vim.keymap.set("n", "<C-h><C-f>", function()
|
||||||
end,
|
harpoon:list():select(4)
|
||||||
desc = "Select harpoon 1",
|
end)
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<C-h><C-s>",
|
|
||||||
function()
|
|
||||||
require("harpoon"):list():select(2)
|
|
||||||
end,
|
|
||||||
desc = "Select harpoon 2",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<C-h><C-d>",
|
|
||||||
function()
|
|
||||||
require("harpoon"):list():select(3)
|
|
||||||
end,
|
|
||||||
desc = "Select harpoon 3",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<C-h><C-f>",
|
|
||||||
function()
|
|
||||||
require("harpoon"):list():select(4)
|
|
||||||
end,
|
|
||||||
desc = "Select harpoon 4",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<C-h><C-h>",
|
|
||||||
function()
|
|
||||||
require("lz.n").trigger_load("telescope.nvim")
|
|
||||||
|
|
||||||
local conf = require("telescope.config").values
|
local conf = require("telescope.config").values
|
||||||
local function toggle_telescope(harpoon_files)
|
local function toggle_telescope(harpoon_files)
|
||||||
|
@ -68,10 +38,8 @@ return {
|
||||||
:find()
|
:find()
|
||||||
end
|
end
|
||||||
|
|
||||||
toggle_telescope(require("harpoon"):list())
|
vim.keymap.set("n", "<C-h><C-h>", function()
|
||||||
|
toggle_telescope(harpoon:list())
|
||||||
|
end, { desc = "Open harpoon window" })
|
||||||
end,
|
end,
|
||||||
mode = "n",
|
|
||||||
desc = "toggle harpoon menu",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
return {
|
return {
|
||||||
"lsp-progress",
|
"lsp-progress",
|
||||||
event = "LspAttach",
|
|
||||||
after = function()
|
after = function()
|
||||||
require("lsp-progress").setup({
|
require("lsp-progress").setup({
|
||||||
client_format = function(client_name, spinner, series_messages)
|
client_format = function(client_name, spinner, series_messages)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"lualine.nvim",
|
"lualine.nvim",
|
||||||
|
event = "BufEnter",
|
||||||
after = function()
|
after = function()
|
||||||
require("lualine").setup({
|
require("lualine").setup({
|
||||||
options = {
|
options = {
|
||||||
|
@ -24,7 +25,6 @@ return {
|
||||||
lualine_a = { "branch" },
|
lualine_a = { "branch" },
|
||||||
lualine_b = {
|
lualine_b = {
|
||||||
function()
|
function()
|
||||||
require("lz.n").trigger_load("lsp-progress")
|
|
||||||
return require("lsp-progress").progress()
|
return require("lsp-progress").progress()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,9 +8,7 @@ return {
|
||||||
require("plugins.lsp-progress"),
|
require("plugins.lsp-progress"),
|
||||||
require("plugins.gitsigns"),
|
require("plugins.gitsigns"),
|
||||||
require("plugins.autopairs"),
|
require("plugins.autopairs"),
|
||||||
require("plugins.trouble"),
|
{ "telescope-ui-select.nvim", priority = 70 },
|
||||||
require("plugins.toggleterm"),
|
|
||||||
{ "telescope-ui-select.nvim" },
|
|
||||||
{
|
{
|
||||||
"nvim-lspconfig",
|
"nvim-lspconfig",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
|
@ -18,6 +16,10 @@ return {
|
||||||
require("lsp")
|
require("lsp")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"sleuth",
|
||||||
|
event = "BufEnter",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"which-key.nvim",
|
"which-key.nvim",
|
||||||
after = function()
|
after = function()
|
||||||
|
@ -27,10 +29,30 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ "nvim-web-devicons" },
|
{ "nvim-web-devicons" },
|
||||||
{ "rose-pine", priority = 100 },
|
{ "rose-pine" },
|
||||||
|
{ "render-markdown.nvim" },
|
||||||
|
{ "markdown-preview.nvim" },
|
||||||
{
|
{
|
||||||
"markdown-preview.nvim",
|
"trouble.nvim",
|
||||||
filetypes = { "markdown" },
|
event = "LspAttach",
|
||||||
|
after = function()
|
||||||
|
require("trouble").setup()
|
||||||
|
vim.keymap.set("n", "<leader>xx", function()
|
||||||
|
vim.cmd("Trouble diagnostics toggle")
|
||||||
|
end, { desc = "Diagnostics" })
|
||||||
|
vim.keymap.set("n", "<leader>xX", function()
|
||||||
|
vim.cmd("Trouble diagnostics toggle filter.buf=0")
|
||||||
|
end, { desc = "Buffer diagnostics" })
|
||||||
|
vim.keymap.set("n", "<leader>cs", function()
|
||||||
|
vim.cmd("Trouble symbols toggle")
|
||||||
|
end, { desc = "Symbols" })
|
||||||
|
vim.keymap.set("n", "<leader>cl", function()
|
||||||
|
vim.cmd("Trouble lsp toggle win.position=right")
|
||||||
|
end, { desc = "LSP definitions / references /..." })
|
||||||
|
vim.keymap.set("n", "<leader>ql", function()
|
||||||
|
vim.cmd("Trouble qflist toggle")
|
||||||
|
end, { desc = "Quickfix list (trouble)" })
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"typst-preview",
|
"typst-preview",
|
||||||
|
@ -44,6 +66,27 @@ return {
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"toggleterm.nvim",
|
||||||
|
after = function()
|
||||||
|
require("toggleterm").setup({
|
||||||
|
shade_terminals = false,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set({ "n", "t", "v" }, "<C-l>", function()
|
||||||
|
vim.cmd("ToggleTerm direction=float")
|
||||||
|
end)
|
||||||
|
vim.keymap.set("n", "<leader>tv", function()
|
||||||
|
vim.cmd("ToggleTerm direction=vertical")
|
||||||
|
end)
|
||||||
|
vim.keymap.set("n", "<leader>tt", function()
|
||||||
|
vim.cmd("ToggleTerm direction=horizontal")
|
||||||
|
end)
|
||||||
|
vim.keymap.set("n", "<leader>ts", function()
|
||||||
|
vim.cmd("TermSelect")
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"mini.ai",
|
"mini.ai",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
|
@ -66,9 +109,9 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"mini.notify",
|
"mini.notify",
|
||||||
|
event = "BufEnter",
|
||||||
after = function()
|
after = function()
|
||||||
require("mini.notify").setup({
|
require("mini.notify").setup({
|
||||||
-- handled by statusline
|
|
||||||
lsp_progress = { enable = false },
|
lsp_progress = { enable = false },
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
@ -83,24 +126,6 @@ return {
|
||||||
{
|
{
|
||||||
"cellular-automaton.nvim",
|
"cellular-automaton.nvim",
|
||||||
cmd = "CellularAutomaton",
|
cmd = "CellularAutomaton",
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>mr",
|
|
||||||
function()
|
|
||||||
vim.cmd.CellularAutomaton("make_it_rain")
|
|
||||||
end,
|
|
||||||
desc = "A surprise!",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>bruh",
|
|
||||||
function()
|
|
||||||
vim.cmd.CellularAutomaton("game_of_life")
|
|
||||||
end,
|
|
||||||
desc = "A surprise!",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"indent-blankline.nvim",
|
"indent-blankline.nvim",
|
||||||
|
@ -125,18 +150,13 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"mini.bufremove",
|
"mini.bufremove",
|
||||||
keys = {
|
event = "BufEnter",
|
||||||
{
|
|
||||||
"<leader>bd",
|
|
||||||
function()
|
|
||||||
MiniBufremove.delete()
|
|
||||||
end,
|
|
||||||
mode = { "n", "v" },
|
|
||||||
desc = "Close buffer",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
after = function()
|
after = function()
|
||||||
require("mini.bufremove").setup()
|
require("mini.bufremove").setup()
|
||||||
|
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>bd", function()
|
||||||
|
MiniBufremove.delete()
|
||||||
|
end)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -149,29 +169,6 @@ return {
|
||||||
{
|
{
|
||||||
"neogit",
|
"neogit",
|
||||||
cmd = "Neogit",
|
cmd = "Neogit",
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>gg",
|
|
||||||
function()
|
|
||||||
vim.cmd.Neogit()
|
|
||||||
end,
|
|
||||||
desc = "Open neogit",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>gc",
|
|
||||||
function()
|
|
||||||
vim.cmd.Neogit("kind=floating commit")
|
|
||||||
end,
|
|
||||||
desc = "Open neogit commit menu",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
before = function()
|
|
||||||
local lz = require("lz.n")
|
|
||||||
lz.trigger_load("diffview.nvim")
|
|
||||||
lz.trigger_load("telescope.nvim")
|
|
||||||
end,
|
|
||||||
after = function()
|
after = function()
|
||||||
require("neogit").setup({
|
require("neogit").setup({
|
||||||
graph_style = "unicode",
|
graph_style = "unicode",
|
||||||
|
@ -189,31 +186,33 @@ return {
|
||||||
{
|
{
|
||||||
"barbecue.nvim",
|
"barbecue.nvim",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<C-j>",
|
|
||||||
function()
|
|
||||||
require("barbecue.ui").navigate(-1)
|
|
||||||
end,
|
|
||||||
desc = "Go to last treesitter node",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
after = function()
|
after = function()
|
||||||
require("barbecue").setup()
|
require("barbecue").setup()
|
||||||
|
-- triggers CursorHold event faster
|
||||||
|
vim.opt.updatetime = 200
|
||||||
|
|
||||||
|
require("barbecue").setup({
|
||||||
|
create_autocmd = false, -- prevent barbecue from updating itself automatically
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({
|
||||||
|
"WinResized",
|
||||||
|
"BufWinEnter",
|
||||||
|
"CursorHold",
|
||||||
|
"InsertLeave",
|
||||||
|
|
||||||
|
-- include this if you have set `show_modified` to `true`
|
||||||
|
"BufModifiedSet",
|
||||||
|
}, {
|
||||||
|
group = vim.api.nvim_create_augroup("barbecue.updater", {}),
|
||||||
|
callback = function()
|
||||||
|
require("barbecue.ui").update()
|
||||||
|
end,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"undotree",
|
"undotree",
|
||||||
cmd = "UndotreeToggle",
|
cmd = "UndotreeToggle",
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>u",
|
|
||||||
function()
|
|
||||||
vim.cmd.UndotreeToggle()
|
|
||||||
end,
|
|
||||||
desc = "Toggle undotree",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,86 +10,32 @@ return {
|
||||||
})
|
})
|
||||||
|
|
||||||
require("telescope").load_extension("ui-select")
|
require("telescope").load_extension("ui-select")
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader> ",
|
|
||||||
function()
|
|
||||||
local builtin = require("telescope.builtin")
|
local builtin = require("telescope.builtin")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader> ", function()
|
||||||
local is_git = vim.fn.finddir(".git", vim.fn.getcwd() .. ";")
|
local is_git = vim.fn.finddir(".git", vim.fn.getcwd() .. ";")
|
||||||
if is_git then
|
if is_git then
|
||||||
builtin.git_files()
|
builtin.git_files()
|
||||||
else
|
else
|
||||||
builtin.find_files()
|
builtin.find_files()
|
||||||
end
|
end
|
||||||
end,
|
end, { desc = "Grep through all files tracked by git, or fall back to just cwd" })
|
||||||
desc = "Grep through all files tracked by git, or fall back to just cwd",
|
|
||||||
mode = "n",
|
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Grep through all files in cwd" })
|
||||||
},
|
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action)
|
||||||
{
|
vim.keymap.set("n", "<leader>/", builtin.live_grep)
|
||||||
"<leader>ff",
|
vim.keymap.set("n", "<leader>k", builtin.buffers)
|
||||||
function()
|
vim.keymap.set("n", "<leader>gd", builtin.lsp_definitions, { desc = "Go to LSP definition" })
|
||||||
require("telescope.builtin").find_files()
|
vim.keymap.set("n", "<leader>gi", builtin.lsp_implementations, { desc = "Go to implementations" })
|
||||||
end,
|
vim.keymap.set("n", "<leader>j", builtin.lsp_document_symbols, { desc = "Search through document symbols" })
|
||||||
desc = "Grep through all files in cwd",
|
vim.keymap.set(
|
||||||
mode = "n",
|
"n",
|
||||||
},
|
|
||||||
{ "<leader>ca", vim.lsp.buf.code_action, desc = "LSP Code Action", mode = "n" },
|
|
||||||
{
|
|
||||||
"<leader>/",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").live_grep()
|
|
||||||
end,
|
|
||||||
desc = "Live grep",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>k",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").buffers()
|
|
||||||
end,
|
|
||||||
desc = "List buffers",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>gd",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_definitions()
|
|
||||||
end,
|
|
||||||
desc = "Go to LSP definition",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>gi",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_implementations()
|
|
||||||
end,
|
|
||||||
desc = "Go to implementations",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>j",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").lsp_document_symbols()
|
|
||||||
end,
|
|
||||||
desc = "Search through document symbols",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fs",
|
"<leader>fs",
|
||||||
function()
|
builtin.lsp_workspace_symbols,
|
||||||
require("telescope.builtin").lsp_workspace_symbols()
|
{ desc = "Search through entire workspace symbols" }
|
||||||
|
)
|
||||||
|
vim.keymap.set("n", "<leader>fd", builtin.diagnostics, { desc = "Search through LSP diagnostics" })
|
||||||
end,
|
end,
|
||||||
desc = "Search through entire workspace symbols",
|
priority = 60,
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fd",
|
|
||||||
function()
|
|
||||||
require("telescope.builtin").diagnostics()
|
|
||||||
end,
|
|
||||||
desc = "Search through LSP diagnostics",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
return {
|
|
||||||
"toggleterm.nvim",
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<C-l>",
|
|
||||||
function()
|
|
||||||
vim.cmd("ToggleTerm direction=float")
|
|
||||||
end,
|
|
||||||
mode = { "n", "t", "v" },
|
|
||||||
desc = "Toggle terminal"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>tv",
|
|
||||||
function()
|
|
||||||
vim.cmd("ToggleTerm direction=vertical")
|
|
||||||
end,
|
|
||||||
desc = "Vertical terminal",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>tt",
|
|
||||||
function()
|
|
||||||
vim.cmd("ToggleTerm direction=horizontal")
|
|
||||||
end,
|
|
||||||
desc = "Horizontal terminal",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>ts",
|
|
||||||
function()
|
|
||||||
vim.cmd("TermSelect")
|
|
||||||
end,
|
|
||||||
desc = "Terminal select",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
after = function()
|
|
||||||
require("toggleterm").setup({
|
|
||||||
shade_terminals = false,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
|
@ -1,49 +0,0 @@
|
||||||
return {
|
|
||||||
"trouble.nvim",
|
|
||||||
cmd = "Trouble",
|
|
||||||
after = function()
|
|
||||||
require("trouble").setup()
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>xx",
|
|
||||||
function()
|
|
||||||
vim.cmd("Trouble diagnostics toggle")
|
|
||||||
end,
|
|
||||||
desc = "Diagnostics",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>xX",
|
|
||||||
function()
|
|
||||||
vim.cmd("Trouble diagnostics toggle filter.buf=0")
|
|
||||||
end,
|
|
||||||
desc = "Buffer diagnostics",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>cs",
|
|
||||||
function()
|
|
||||||
vim.cmd("Trouble symbols toggle")
|
|
||||||
end,
|
|
||||||
desc = "Symbols",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>cl",
|
|
||||||
function()
|
|
||||||
vim.cmd("Trouble lsp toggle win.position=right")
|
|
||||||
end,
|
|
||||||
desc = "LSP definitions / references /...",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>ql",
|
|
||||||
function()
|
|
||||||
vim.cmd("Trouble qflist toggle")
|
|
||||||
end,
|
|
||||||
desc = "Quickfix list (trouble)",
|
|
||||||
mode = "n",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
Loading…
Reference in a new issue