Compare commits
2 Commits
35ea810bd8
...
1c2b5f8a0e
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c2b5f8a0e | |||
| db120ff9e3 |
@@ -5,6 +5,8 @@ Inspirations:
|
|||||||
- [nolan](https://github.com/Hrumble/sneaky-nvim-config)
|
- [nolan](https://github.com/Hrumble/sneaky-nvim-config)
|
||||||
- [mats](https://github.com/BeerB34r/dotfiles)
|
- [mats](https://github.com/BeerB34r/dotfiles)
|
||||||
|
|
||||||
|
[Great guide on vim.pack](https://echasnovski.com/blog/2026-03-13-a-guide-to-vim-pack#delete)
|
||||||
|
|
||||||
# Neovim Notes
|
# Neovim Notes
|
||||||
|
|
||||||
See custom keymaps with short descriptions with `<leader><leader>h`.
|
See custom keymaps with short descriptions with `<leader><leader>h`.
|
||||||
@@ -96,7 +98,6 @@ Useful LSP commands:
|
|||||||
- `<leader>ca` show code actions
|
- `<leader>ca` show code actions
|
||||||
- `<leader>cf` apply quick fixes
|
- `<leader>cf` apply quick fixes
|
||||||
- `<leader>cs` show source actions
|
- `<leader>cs` show source actions
|
||||||
- `<C-Space>` trigger completion
|
|
||||||
|
|
||||||
Diagnostics:
|
Diagnostics:
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ o.expandtab = true -- Inserts spaces when indenting by default.
|
|||||||
o.smartindent = true -- Adds indentation automatically on new lines.
|
o.smartindent = true -- Adds indentation automatically on new lines.
|
||||||
o.swapfile = false -- Disables swapfile creation.
|
o.swapfile = false -- Disables swapfile creation.
|
||||||
o.incsearch = true -- Updates search matches as you type.
|
o.incsearch = true -- Updates search matches as you type.
|
||||||
|
o.completeopt = { "menuone", "noselect", "fuzzy", "nosort" } -- Enables fuzzy completion matching without preselecting or reordering candidates.
|
||||||
o.updatetime = 50 -- Reduces idle delay for swap and CursorHold events.
|
o.updatetime = 50 -- Reduces idle delay for swap and CursorHold events.
|
||||||
o.spelllang = { "en_us" } -- Uses US English for spell checking.
|
o.spelllang = { "en_us" } -- Uses US English for spell checking.
|
||||||
o.shell = "bash" -- Runs shell commands through bash.
|
o.shell = "bash" -- Runs shell commands through bash.
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
require("romanzy.plugins.rose-pine")
|
require("romanzy.plugins.rose-pine")
|
||||||
require("romanzy.plugins.mini")
|
require("romanzy.plugins.mini")
|
||||||
require("romanzy.plugins.blink-cmp")
|
|
||||||
require("romanzy.plugins.lazygit")
|
require("romanzy.plugins.lazygit")
|
||||||
require("romanzy.plugins.oil")
|
require("romanzy.plugins.oil")
|
||||||
require("romanzy.plugins.telescope")
|
require("romanzy.plugins.telescope")
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
vim.pack.add({ 'https://github.com/saghen/blink.lib', 'https://github.com/saghen/blink.cmp' })
|
|
||||||
|
|
||||||
local cmp = require('blink.cmp')
|
|
||||||
-- cmp.build():pwait()
|
|
||||||
cmp.setup({
|
|
||||||
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
|
|
||||||
-- 'super-tab' for mappings similar to vscode (tab to accept)
|
|
||||||
-- 'enter' for enter to accept
|
|
||||||
-- 'none' for no mappings
|
|
||||||
--
|
|
||||||
-- All presets have the following mappings:
|
|
||||||
-- C-space: Open menu or open docs if already open
|
|
||||||
-- C-n/C-p or Up/Down: Select next/previous item
|
|
||||||
-- C-e: Hide menu
|
|
||||||
-- C-k: Toggle signature help (if signature.enabled = true)
|
|
||||||
--
|
|
||||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
|
||||||
keymap = { preset = 'default' },
|
|
||||||
|
|
||||||
completion = {
|
|
||||||
documentation = { auto_show = false },
|
|
||||||
-- list = {
|
|
||||||
-- selection = {
|
|
||||||
-- preselect = false,
|
|
||||||
-- auto_insert = false,
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
|
|
||||||
-- (Default) list of enabled providers defined so that you can extend it
|
|
||||||
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
|
||||||
sources = { default = { 'lsp', 'path', 'snippets', 'buffer' } },
|
|
||||||
|
|
||||||
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
|
|
||||||
-- You may use a lua implementation instead by using `implementation = "lua"`
|
|
||||||
-- See the fuzzy documentation for more information
|
|
||||||
-- fuzzy = { implementation = "prefer_rust_with_warning" }
|
|
||||||
fuzzy = { implementation = "lua" }
|
|
||||||
})
|
|
||||||
@@ -43,7 +43,7 @@ end
|
|||||||
|
|
||||||
configure_diagnostics()
|
configure_diagnostics()
|
||||||
|
|
||||||
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
local capabilities = require("mini.completion").get_lsp_capabilities()
|
||||||
local managed_servers = {
|
local managed_servers = {
|
||||||
"bashls",
|
"bashls",
|
||||||
"clangd",
|
"clangd",
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ vim.pack.add({
|
|||||||
})
|
})
|
||||||
|
|
||||||
local clue = require("mini.clue")
|
local clue = require("mini.clue")
|
||||||
|
local completion = require("mini.completion")
|
||||||
local icons = require("mini.icons")
|
local icons = require("mini.icons")
|
||||||
local git = require("mini.git")
|
local git = require("mini.git")
|
||||||
local diff = require("mini.diff")
|
local diff = require("mini.diff")
|
||||||
@@ -17,15 +18,6 @@ local ai = require("mini.ai")
|
|||||||
local notify = require("mini.notify")
|
local notify = require("mini.notify")
|
||||||
local surround = require("mini.surround")
|
local surround = require("mini.surround")
|
||||||
|
|
||||||
local function set_mini_diff_highlights()
|
|
||||||
vim.api.nvim_set_hl(0, "MiniDiffSignAdd", { fg = "#9ccf8d" })
|
|
||||||
vim.api.nvim_set_hl(0, "MiniDiffSignChange", { fg = "#f6c177" })
|
|
||||||
vim.api.nvim_set_hl(0, "MiniDiffSignDelete", { fg = "#eb6f92" })
|
|
||||||
vim.api.nvim_set_hl(0, "MiniDiffOverAdd", { fg = "#9ccf8d" })
|
|
||||||
vim.api.nvim_set_hl(0, "MiniDiffOverChange", { fg = "#f6c177" })
|
|
||||||
vim.api.nvim_set_hl(0, "MiniDiffOverDelete", { fg = "#eb6f92" })
|
|
||||||
end
|
|
||||||
|
|
||||||
clue.setup({
|
clue.setup({
|
||||||
triggers = {
|
triggers = {
|
||||||
{ mode = "n", keys = "<leader>" },
|
{ mode = "n", keys = "<leader>" },
|
||||||
@@ -47,14 +39,40 @@ clue.setup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
completion.setup({})
|
||||||
|
local function complete_accept_top()
|
||||||
|
if vim.fn.pumvisible() == 0 then
|
||||||
|
return "<C-y>"
|
||||||
|
end
|
||||||
|
|
||||||
|
if vim.fn.complete_info({ "selected" }).selected == -1 then
|
||||||
|
return "<C-n><C-y>"
|
||||||
|
end
|
||||||
|
|
||||||
|
return "<C-y>"
|
||||||
|
end
|
||||||
|
vim.keymap.set("i", "<C-y>", complete_accept_top, { expr = true })
|
||||||
|
|
||||||
icons.setup({})
|
icons.setup({})
|
||||||
|
|
||||||
git.setup({})
|
git.setup({})
|
||||||
|
|
||||||
diff.setup({})
|
diff.setup({})
|
||||||
|
local function set_mini_diff_highlights()
|
||||||
|
vim.api.nvim_set_hl(0, "MiniDiffSignAdd", { fg = "#9ccf8d" })
|
||||||
|
vim.api.nvim_set_hl(0, "MiniDiffSignChange", { fg = "#f6c177" })
|
||||||
|
vim.api.nvim_set_hl(0, "MiniDiffSignDelete", { fg = "#eb6f92" })
|
||||||
|
vim.api.nvim_set_hl(0, "MiniDiffOverAdd", { fg = "#9ccf8d" })
|
||||||
|
vim.api.nvim_set_hl(0, "MiniDiffOverChange", { fg = "#f6c177" })
|
||||||
|
vim.api.nvim_set_hl(0, "MiniDiffOverDelete", { fg = "#eb6f92" })
|
||||||
|
end
|
||||||
set_mini_diff_highlights()
|
set_mini_diff_highlights()
|
||||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||||
callback = set_mini_diff_highlights,
|
callback = set_mini_diff_highlights,
|
||||||
})
|
})
|
||||||
|
|
||||||
statusline.setup({ use_icons = true })
|
statusline.setup({ use_icons = true })
|
||||||
|
|
||||||
hipatterns.setup({
|
hipatterns.setup({
|
||||||
highlighters = {
|
highlighters = {
|
||||||
fixme = { pattern = "%f[%w]()FIXME()%f[%W]", group = "MiniHipatternsFixme" },
|
fixme = { pattern = "%f[%w]()FIXME()%f[%W]", group = "MiniHipatternsFixme" },
|
||||||
@@ -64,10 +82,13 @@ hipatterns.setup({
|
|||||||
hex_color = hipatterns.gen_highlighter.hex_color(),
|
hex_color = hipatterns.gen_highlighter.hex_color(),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
pairs.setup({
|
pairs.setup({
|
||||||
modes = { insert = true, command = true, terminal = false },
|
modes = { insert = true, command = true, terminal = false },
|
||||||
})
|
})
|
||||||
|
|
||||||
ai.setup({})
|
ai.setup({})
|
||||||
|
|
||||||
notify.setup({
|
notify.setup({
|
||||||
lsp_progress = {
|
lsp_progress = {
|
||||||
-- the message "lua_ls: processing completion..." and
|
-- the message "lua_ls: processing completion..." and
|
||||||
@@ -75,6 +96,6 @@ notify.setup({
|
|||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.notify = notify.make_notify()
|
vim.notify = notify.make_notify()
|
||||||
|
|
||||||
surround.setup({})
|
surround.setup({})
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
{
|
{
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"blink.cmp": {
|
|
||||||
"rev": "bda905a4bf1b3edfa708b0be193b8c63d8620c96",
|
|
||||||
"src": "https://github.com/saghen/blink.cmp"
|
|
||||||
},
|
|
||||||
"blink.lib": {
|
|
||||||
"rev": "5876dd95deeb70aadbe9f1c0b7117a135061cdac",
|
|
||||||
"src": "https://github.com/saghen/blink.lib"
|
|
||||||
},
|
|
||||||
"codam-header.nvim": {
|
"codam-header.nvim": {
|
||||||
"rev": "a8fbd2a7003eecbf6e85693e85d7d4d464625193",
|
"rev": "a8fbd2a7003eecbf6e85693e85d7d4d464625193",
|
||||||
"src": "https://github.com/BeerB34r/codam-header.nvim"
|
"src": "https://github.com/BeerB34r/codam-header.nvim"
|
||||||
@@ -21,7 +13,7 @@
|
|||||||
"src": "https://github.com/kdheepak/lazygit.nvim"
|
"src": "https://github.com/kdheepak/lazygit.nvim"
|
||||||
},
|
},
|
||||||
"mason-lspconfig.nvim": {
|
"mason-lspconfig.nvim": {
|
||||||
"rev": "21c5b3ebeaa0412e28096bb0701434c51c1fbf76",
|
"rev": "47059d71b42d74b0a1e9f61c1d99d301039c3b5b",
|
||||||
"src": "https://github.com/mason-org/mason-lspconfig.nvim"
|
"src": "https://github.com/mason-org/mason-lspconfig.nvim"
|
||||||
},
|
},
|
||||||
"mason.nvim": {
|
"mason.nvim": {
|
||||||
@@ -29,11 +21,11 @@
|
|||||||
"src": "https://github.com/mason-org/mason.nvim"
|
"src": "https://github.com/mason-org/mason.nvim"
|
||||||
},
|
},
|
||||||
"mini.nvim": {
|
"mini.nvim": {
|
||||||
"rev": "1599a473aa6f5290a5d740b1144846e6f0c3963d",
|
"rev": "c5cdbadeb423ff724e27a42ab2d1c504d1d6fc5a",
|
||||||
"src": "https://github.com/echasnovski/mini.nvim"
|
"src": "https://github.com/echasnovski/mini.nvim"
|
||||||
},
|
},
|
||||||
"nvim-lspconfig": {
|
"nvim-lspconfig": {
|
||||||
"rev": "bfcc0171a43f22afa61d927ffe9fcb6cb85dc99e",
|
"rev": "292f44408498103c47996ff5c18fd366293840d8",
|
||||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||||
},
|
},
|
||||||
"nvim-treesitter": {
|
"nvim-treesitter": {
|
||||||
|
|||||||
Reference in New Issue
Block a user