Skip to content

Commit 4095694

Browse files
author
Francis
committed
mbp
1 parent ee0ee40 commit 4095694

File tree

7 files changed

+130
-48
lines changed

7 files changed

+130
-48
lines changed

.DS_Store

0 Bytes
Binary file not shown.

init.lua

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
171171
-- Save file
172172
vim.keymap.set('n', '<leader>w', '<cmd>w<CR>', { desc = 'Save file' })
173173

174+
-- Duplicate line (without affecting yank register)
175+
vim.keymap.set('n', '<leader>d', ':t.<CR>', { desc = 'Duplicate line' })
176+
174177
-- Diagnostic keymaps
175178
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
176179

@@ -231,6 +234,41 @@ map('n', '<D-k>', ':m .-2<CR>==', { desc = 'Move line up (Cmd)' })
231234
map('v', '<D-j>', ":m '>+1<CR>gv=gv", { desc = 'Move selection down (Cmd)' })
232235
map('v', '<D-k>', ":m '<-2<CR>gv=gv", { desc = 'Move selection up (Cmd)' })
233236

237+
-- Jump to last terminal buffer and enter insert mode
238+
map('n', '<leader>tt', function()
239+
local term_bufs = vim.tbl_filter(function(buf)
240+
return vim.bo[buf].buftype == 'terminal'
241+
end, vim.api.nvim_list_bufs())
242+
243+
if #term_bufs > 0 then
244+
vim.cmd('buffer ' .. term_bufs[#term_bufs])
245+
vim.cmd('startinsert')
246+
end
247+
end, { desc = 'Jump to last terminal buffer' })
248+
249+
-- Zig debug print variable
250+
map('n', '<leader>pf', function()
251+
-- Get the word under cursor
252+
local word = vim.fn.expand('<cword>')
253+
254+
-- Get current line number
255+
local line = vim.fn.line('.')
256+
257+
-- Get current indentation
258+
local indent = vim.fn.indent(line)
259+
local indent_str = string.rep(' ', indent)
260+
261+
-- Create the debug print line
262+
local debug_line = indent_str .. 'std.debug.print("' .. word .. ': {}\\n", .{' .. word .. '});'
263+
264+
-- Insert line below and position cursor
265+
vim.fn.append(line, debug_line)
266+
267+
-- Move cursor to the inserted line, at the position after the opening quote
268+
vim.fn.cursor(line + 1, indent + 19 + #word)
269+
vim.cmd('startinsert')
270+
end, { desc = 'Zig debug print variable' })
271+
234272
-- [[ Basic Autocommands ]]
235273
-- See `:help lua-guide-autocommands`
236274

@@ -245,6 +283,9 @@ vim.api.nvim_create_autocmd('TextYankPost', {
245283
end,
246284
})
247285

286+
-- Make indent guides match comment color
287+
vim.api.nvim_set_hl(0, 'IblIndent', { fg = '#161a1f' }) -- RGB 22, 26, 31
288+
248289
-- [[ Install `lazy.nvim` plugin manager ]]
249290
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
250291
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
@@ -271,44 +312,6 @@ vim.opt.rtp:prepend(lazypath)
271312
require('lazy').setup({
272313
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
273314
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
274-
--NOTE: nvim-tree - FQ
275-
{
276-
'nvim-tree/nvim-tree.lua',
277-
dependencies = {
278-
'nvim-tree/nvim-web-devicons', -- optional, for file icons
279-
},
280-
version = '*',
281-
lazy = false,
282-
config = function()
283-
require('nvim-tree').setup {
284-
sync_root_with_cwd = true,
285-
respect_buf_cwd = true,
286-
}
287-
-- Optional: Keybinding to toggle nvim-tree
288-
vim.keymap.set('n', '<leader>e', ':NvimTreeToggle<CR>', { desc = 'Toggle File Explorer (nvim-tree)' })
289-
end,
290-
},
291-
-- NOTE: FQ dropbar
292-
{
293-
'Bekaboo/dropbar.nvim',
294-
-- optional, but required for fuzzy finder support
295-
dependencies = {
296-
'nvim-telescope/telescope-fzf-native.nvim',
297-
build = 'make',
298-
},
299-
config = function()
300-
local dropbar_api = require 'dropbar.api'
301-
vim.keymap.set('n', '<Leader>;', dropbar_api.pick, { desc = 'Pick symbols in winbar' })
302-
vim.keymap.set('n', '[;', dropbar_api.goto_context_start, { desc = 'Go to start of current context' })
303-
vim.keymap.set('n', '];', dropbar_api.select_next_context, { desc = 'Select next context' })
304-
end,
305-
},
306-
-- --NOTE: Kanso Theme - FQ
307-
-- {
308-
-- 'webhooked/kanso.nvim',
309-
-- lazy = false,
310-
-- priority = 1000,
311-
-- },
312315
-- NOTE: Plugins can also be added by using a table,
313316
-- with the first argument being the link and the following
314317
-- keys can be used to configure plugin behavior/loading/etc.

lazy-lock.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@
66
"dropbar.nvim": { "branch": "master", "commit": "b695c346fd180d504c1d135435cbcfba08ad3946" },
77
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
88
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
9-
"gitsigns.nvim": { "branch": "main", "commit": "88205953bd748322b49b26e1dfb0389932520dc9" },
9+
"gitsigns.nvim": { "branch": "main", "commit": "1ee5c1fd068c81f9dd06483e639c2aa4587dc197" },
10+
"hover.nvim": { "branch": "main", "commit": "3b49066e09e03e63be6d6f43ae2b8bcd58301f63" },
11+
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
1012
"kanso.nvim": { "branch": "main", "commit": "62e9c5d669567d086474b2b6863e0724c71c6c99" },
1113
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
1214
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
1315
"marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" },
14-
"mason-lspconfig.nvim": { "branch": "main", "commit": "be159e939543777bbfe9e1fe5389984c4570afce" },
15-
"mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" },
16-
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
17-
"mini.nvim": { "branch": "main", "commit": "3f5d06a6f710966cb93baaadc4897eeb6d6210e5" },
18-
"nvim-lspconfig": { "branch": "master", "commit": "9276b82935bf6b951d08c864eb5ac3f85d6b743b" },
19-
"nvim-tree.lua": { "branch": "master", "commit": "6b5b36659688767fb9f133bb83024ab1466fe5cd" },
16+
"mason-lspconfig.nvim": { "branch": "main", "commit": "6bdb14f230de0904229ec367b410fb817e59b072" },
17+
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
18+
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
19+
"mini.nvim": { "branch": "main", "commit": "4eaa8f4034535c372f6ca04b2772897048296dab" },
20+
"nvim-lspconfig": { "branch": "master", "commit": "ac98db2f9f06a56498ec890a96928774eae412c3" },
21+
"nvim-tree.lua": { "branch": "master", "commit": "321bc61580fd066b76861c32de3319c3a6d089e7" },
2022
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
21-
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
23+
"nvim-web-devicons": { "branch": "master", "commit": "b8221e42cf7287c4dcde81f232f58d7b947c210d" },
2224
"persistence.nvim": { "branch": "main", "commit": "51eef57272742b773468949f6bd0503ec3f83874" },
2325
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
2426
"precognition.nvim": { "branch": "main", "commit": "2aae2687207029b3611a0e19a289f9e1c7efbe16" },
@@ -27,5 +29,5 @@
2729
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
2830
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
2931
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
30-
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
32+
"which-key.nvim": { "branch": "main", "commit": "b4177e3eaf15fe5eb8357ebac2286d488be1ed00" }
3133
}

lua/custom/plugins/dropbar.lua

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
return {
2+
'Bekaboo/dropbar.nvim',
3+
dependencies = {
4+
'nvim-telescope/telescope-fzf-native.nvim',
5+
build = 'make',
6+
},
7+
config = function()
8+
local dropbar_api = require 'dropbar.api'
9+
vim.keymap.set('n', '<Leader>;', dropbar_api.pick, { desc = 'Pick symbols in winbar' })
10+
vim.keymap.set('n', '[;', dropbar_api.goto_context_start, { desc = 'Go to start of current context' })
11+
vim.keymap.set('n', '];', dropbar_api.select_next_context, { desc = 'Select next context' })
12+
end,
13+
}

lua/custom/plugins/hover.lua

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
return {
2+
'lewis6991/hover.nvim',
3+
config = function()
4+
require('hover').setup {
5+
init = function()
6+
-- Require providers
7+
require 'hover.providers.lsp'
8+
require 'hover.providers.diagnostic'
9+
require 'hover.providers.man'
10+
require 'hover.providers.dictionary'
11+
end,
12+
preview_opts = {
13+
border = 'rounded',
14+
},
15+
preview_window = false,
16+
title = true,
17+
mouse_providers = {
18+
'LSP',
19+
},
20+
mouse_delay = 1000,
21+
}
22+
23+
-- Setup keymaps
24+
vim.keymap.set('n', 'K', require('hover').hover, { desc = 'hover.nvim' })
25+
vim.keymap.set('n', 'gK', require('hover').hover_select, { desc = 'hover.nvim (select)' })
26+
vim.keymap.set('n', '<C-p>', function()
27+
require('hover').hover_switch 'previous'
28+
end, { desc = 'hover.nvim (previous source)' })
29+
vim.keymap.set('n', '<C-n>', function()
30+
require('hover').hover_switch 'next'
31+
end, { desc = 'hover.nvim (next source)' })
32+
33+
-- Mouse support
34+
vim.keymap.set('n', '<MouseMove>', require('hover').hover_mouse, { desc = 'hover.nvim (mouse)' })
35+
vim.o.mousemoveevent = true
36+
end,
37+
}

lua/custom/plugins/nvim-tree.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
return {
2+
'nvim-tree/nvim-tree.lua',
3+
dependencies = {
4+
'nvim-tree/nvim-web-devicons', -- optional, for file icons
5+
},
6+
version = '*',
7+
lazy = false,
8+
config = function()
9+
require('nvim-tree').setup {
10+
sync_root_with_cwd = true,
11+
respect_buf_cwd = true,
12+
}
13+
-- Keybinding to toggle nvim-tree
14+
vim.keymap.set('n', '<leader>e', ':NvimTreeToggle<CR>', { desc = 'Toggle File Explorer (nvim-tree)' })
15+
end,
16+
}

lua/kickstart/plugins/indent_line.lua

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ return {
44
-- Enable `lukas-reineke/indent-blankline.nvim`
55
-- See `:help ibl`
66
main = 'ibl',
7-
opts = {},
7+
dependencies = { 'nvim-treesitter/nvim-treesitter' },
8+
opts = {
9+
indent = {
10+
char = '', -- Thinner character (alternatives: '│', '┊', '┆', '¦', '|', '⁞')
11+
smart_indent_cap = true,
12+
},
13+
scope = {
14+
enabled = false, -- Disable scope highlighting
15+
show_start = false,
16+
show_end = false,
17+
},
18+
},
819
},
920
}

0 commit comments

Comments
 (0)