Skip to content

Commit 8595f2c

Browse files
committed
Finalizing 5150.nvim with Kickstart
1 parent d1f7a10 commit 8595f2c

File tree

6 files changed

+157
-5
lines changed

6 files changed

+157
-5
lines changed

init.lua

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ vim.o.number = true
1818
-- Experiment for yourself to see if you like it!
1919
vim.o.relativenumber = true
2020

21+
vim.o.wrap = true
22+
vim.o.linebreak = true
23+
2124
-- Enable mouse mode, can be useful for resizing splits for example!
2225
vim.o.mouse = 'a'
2326

@@ -121,9 +124,11 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
121124

122125
-- [[ Additional Remaps ]]
123126
vim.keymap.set('n', '<leader>pv', '<cmd>:Ex<CR>')
124-
vim.keymap.set('n', '<leader>x', '<cmd>:so<CR>')
125127
vim.keymap.set('n', '<leader>fc', '<cmd>:fc<CR>')
126-
vim.keymap.set('n', '<leader>cr', '<cmd>:%s/\r//g')
128+
vim.keymap.set('n', '<leader>cr', '<cmd>:%s/\r//g<CR>')
129+
vim.keymap.set('n', '<leader>xx', function()
130+
require('trouble').toggle()
131+
end, { desc = 'Toggle Trouble' })
127132

128133
-- [[ Basic Autocommands ]]
129134
-- See `:help lua-guide-autocommands`
@@ -464,7 +469,9 @@ require('lazy').setup({
464469
map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' })
465470

466471
-- Find references for the word under your cursor.
467-
map('grr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
472+
map('grr', function()
473+
require('trouble').toggle 'lsp_references'
474+
end, '[G]oto [R]eferences (Trouble)')
468475

469476
-- Jump to the implementation of the word under your cursor.
470477
-- Useful when your language has ways of declaring types without an actual implementation.
@@ -594,7 +601,6 @@ require('lazy').setup({
594601
gopls = {},
595602
pyright = {},
596603
-- rust_analyzer = {},
597-
elixir_ls = {},
598604
lexical = {},
599605
ruff = {},
600606
sqls = {},
@@ -900,11 +906,15 @@ require('lazy').setup({
900906
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
901907
--
902908
require 'kickstart.plugins.debug',
903-
-- require 'kickstart.plugins.indent_line',
909+
require 'kickstart.plugins.indent_line',
904910
require 'kickstart.plugins.lint',
905911
require 'kickstart.plugins.autopairs',
906912
-- require 'kickstart.plugins.neo-tree',
907913
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
914+
require 'kickstart.plugins.copilot',
915+
require 'kickstart.plugins.harpoon',
916+
require 'kickstart.plugins.fugitive',
917+
require 'kickstart.plugins.trouble',
908918

909919
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
910920
-- This is the easiest way to modularize your config.

lazy-lock.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
3+
"blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
4+
"conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" },
5+
"copilot.vim": { "branch": "release", "commit": "51f80c0ed4f70d1c7e8c0ff11a792a9d84502c03" },
6+
"fidget.nvim": { "branch": "main", "commit": "4ec7bed6c86b671ddde03ca1b227343cfa3e65fa" },
7+
"gitsigns.nvim": { "branch": "main", "commit": "cc2e664c7e3cd8a31af34df040d16a75cfcadced" },
8+
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
9+
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
10+
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
11+
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
12+
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
13+
"mason-lspconfig.nvim": { "branch": "main", "commit": "844d247d998c2f9a6a3baad8bb9748edc55ce69f" },
14+
"mason-nvim-dap.nvim": { "branch": "main", "commit": "86389a3dd687cfaa647b6f44731e492970034baa" },
15+
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
16+
"mason.nvim": { "branch": "main", "commit": "3671ab0d40aa5bd24b1686562bd0a23391ecf76a" },
17+
"mini.nvim": { "branch": "main", "commit": "c122e852517adaf7257688e435369c050da113b1" },
18+
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
19+
"nvim-dap": { "branch": "master", "commit": "5dd4d50f2e6a2eaf9e57fad023d294ef371bda35" },
20+
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
21+
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
22+
"nvim-lint": { "branch": "master", "commit": "7ef127aaede2a4d5ad8df8321e2eb4e567f29594" },
23+
"nvim-lspconfig": { "branch": "master", "commit": "d0dbf489a8810672fa9a61f4a86e5cf89214b772" },
24+
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
25+
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
26+
"nvim-web-devicons": { "branch": "master", "commit": "4a8369f4c78ef6f6f895f0cec349e48f74330574" },
27+
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
28+
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
29+
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
30+
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
31+
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
32+
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
33+
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
34+
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
35+
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
36+
}

lua/kickstart/plugins/copilot.lua

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
return {
2+
'github/copilot.vim',
3+
event = 'InsertEnter',
4+
config = function()
5+
vim.g.copilot_no_tab_map = true
6+
7+
local keymap = vim.keymap.set
8+
keymap('i', '<C-L>', 'copilot#Accept("<CR>")', { expr = true, silent = true })
9+
keymap('i', '<M-j>', 'copilot#Next()', { expr = true, silent = true })
10+
keymap('i', '<M-k>', 'copilot#Previous()', { expr = true, silent = true })
11+
keymap('i', '<C-E>', 'copilot#Dismiss()', { expr = true, silent = true })
12+
end,
13+
}

lua/kickstart/plugins/fugitive.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
return {
2+
'tpope/vim-fugitive',
3+
cmd = { 'Git', 'G' },
4+
keys = {
5+
{ '<leader>gg', '<cmd>Git<CR>', desc = 'Git Status' },
6+
},
7+
}

lua/kickstart/plugins/harpoon.lua

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
return {
2+
'ThePrimeagen/harpoon',
3+
dependencies = { 'nvim-lua/plenary.nvim' },
4+
config = function()
5+
require('harpoon').setup {}
6+
end,
7+
keys = {
8+
{
9+
'<leader>ha',
10+
function()
11+
require('harpoon.mark').add_file()
12+
end,
13+
desc = 'Harpoon: Add File',
14+
},
15+
{
16+
'<leader>hr',
17+
function()
18+
require('harpoon.mark').rm_file()
19+
end,
20+
desc = 'Harpoon: Remove File',
21+
},
22+
{
23+
'<leader>hm',
24+
function()
25+
require('harpoon.ui').toggle_quick_menu()
26+
end,
27+
desc = 'Harpoon: Open Menu',
28+
},
29+
{
30+
'<leader>1',
31+
function()
32+
require('harpoon.ui').nav_file(1)
33+
end,
34+
desc = 'Harpoon to file 1',
35+
},
36+
{
37+
'<leader>2',
38+
function()
39+
require('harpoon.ui').nav_file(2)
40+
end,
41+
desc = 'Harpoon to file 2',
42+
},
43+
{
44+
'<leader>3',
45+
function()
46+
require('harpoon.ui').nav_file(3)
47+
end,
48+
desc = 'Harpoon to file 3',
49+
},
50+
{
51+
'<leader>4',
52+
function()
53+
require('harpoon.ui').nav_file(4)
54+
end,
55+
desc = 'Harpoon to file 4',
56+
},
57+
},
58+
}

lua/kickstart/plugins/trouble.lua

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
return {
2+
'folke/trouble.nvim',
3+
dependencies = { 'nvim-tree/nvim-web-devicons' },
4+
opts = {},
5+
keys = {
6+
{
7+
'<leader>xx',
8+
function()
9+
require('trouble').toggle()
10+
end,
11+
desc = 'Toggle Trouble',
12+
},
13+
{
14+
'<leader>xw',
15+
function()
16+
require('trouble').toggle 'workspace_diagnostics'
17+
end,
18+
desc = 'Workspace Diagnostics',
19+
},
20+
{
21+
'<leader>xd',
22+
function()
23+
require('trouble').toggle 'document_diagnostics'
24+
end,
25+
desc = 'Document Diagnostics',
26+
},
27+
},
28+
}

0 commit comments

Comments
 (0)