@@ -166,6 +166,22 @@ vim.o.scrolloff = 10
166166-- See `:help 'confirm'`
167167vim .o .confirm = true
168168
169+ vim .o .tabstop = 4
170+ vim .o .shiftwidth = 2
171+ vim .o .colorcolumn = ' 80'
172+
173+ -- move lines keymap
174+
175+ vim .keymap .set (' v' , ' J' , " :m '>+1<CR>gv=gv" , { desc = ' Move line down' })
176+ vim .keymap .set (' v' , ' K' , " :m '<-2<CR>gv=gv" , { desc = ' Move line up ' })
177+
178+ -- move record macro to Q instead of q
179+ vim .keymap .set (' n' , ' Q' , ' q' , opts )
180+ vim .keymap .set (' n' , ' q' , ' <Nop>' , opts )
181+
182+ -- open project view
183+ vim .keymap .set (' n' , ' <leader>pv' , vim .cmd .Ex , { desc = ' Open [P]roject [V]iew' })
184+
169185-- [[ Basic Keymaps ]]
170186-- See `:help vim.keymap.set()`
171187
@@ -185,10 +201,10 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
185201vim .keymap .set (' t' , ' <Esc><Esc>' , ' <C-\\ ><C-n>' , { desc = ' Exit terminal mode' })
186202
187203-- TIP: Disable arrow keys in normal mode
188- -- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
189- -- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
190- -- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
191- -- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
204+ vim .keymap .set (' n' , ' <left>' , ' <cmd>echo "Use h to move!!"<CR>' )
205+ vim .keymap .set (' n' , ' <right>' , ' <cmd>echo "Use l to move!!"<CR>' )
206+ vim .keymap .set (' n' , ' <up>' , ' <cmd>echo "Use k to move!!"<CR>' )
207+ vim .keymap .set (' n' , ' <down>' , ' <cmd>echo "Use j to move!!"<CR>' )
192208
193209-- Keybinds to make split navigation easier.
194210-- Use CTRL+<hjkl> to switch between windows
@@ -198,7 +214,6 @@ vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left wind
198214vim .keymap .set (' n' , ' <C-l>' , ' <C-w><C-l>' , { desc = ' Move focus to the right window' })
199215vim .keymap .set (' n' , ' <C-j>' , ' <C-w><C-j>' , { desc = ' Move focus to the lower window' })
200216vim .keymap .set (' n' , ' <C-k>' , ' <C-w><C-k>' , { desc = ' Move focus to the upper window' })
201-
202217-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
203218-- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
204219-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
@@ -347,6 +362,8 @@ require('lazy').setup({
347362 { ' <leader>s' , group = ' [S]earch' },
348363 { ' <leader>t' , group = ' [T]oggle' },
349364 { ' <leader>h' , group = ' Git [H]unk' , mode = { ' n' , ' v' } },
365+ { ' <leader>h' , group = ' [H]arpoon' , mode = { ' n' } },
366+ { ' <leader>p' , group = ' [P]roject' , mode = { ' n' } },
350367 },
351368 },
352369 },
@@ -684,6 +701,8 @@ require('lazy').setup({
684701 -- ts_ls = {},
685702 --
686703
704+ vue_ls = {},
705+
687706 lua_ls = {
688707 -- cmd = { ... },
689708 -- filetypes = { ... },
@@ -729,7 +748,6 @@ require('lazy').setup({
729748 -- by the server configuration above. Useful when disabling
730749 -- certain features of an LSP (for example, turning off formatting for ts_ls)
731750 server .capabilities = vim .tbl_deep_extend (' force' , {}, capabilities , server .capabilities or {})
732- require (' lspconfig' )[server_name ].setup (server )
733751 end ,
734752 },
735753 }
@@ -772,7 +790,10 @@ require('lazy').setup({
772790 -- python = { "isort", "black" },
773791 --
774792 -- You can use 'stop_after_first' to run the first available formatter from the list
775- -- javascript = { "prettierd", "prettier", stop_after_first = true },
793+ javascript = { ' prettierd' , ' prettier' , stop_after_first = true },
794+ typescript = { ' prettierd' , ' prettier' , stop_after_first = true },
795+ vue = { ' prettierd' , ' prettier' , stop_after_first = true },
796+ nix = { ' alejandra' },
776797 },
777798 },
778799 },
@@ -899,7 +920,12 @@ require('lazy').setup({
899920 },
900921
901922 -- Highlight todo, notes, etc in comments
902- { ' folke/todo-comments.nvim' , event = ' VimEnter' , dependencies = { ' nvim-lua/plenary.nvim' }, opts = { signs = false } },
923+ {
924+ ' folke/todo-comments.nvim' ,
925+ event = ' VimEnter' ,
926+ dependencies = { ' nvim-lua/plenary.nvim' },
927+ opts = { signs = false , keywords = { TODO = { alt = { ' CSAH' } } } },
928+ },
903929
904930 { -- Collection of various small independent plugins/modules
905931 ' echasnovski/mini.nvim' ,
@@ -963,6 +989,49 @@ require('lazy').setup({
963989 -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
964990 -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
965991 },
992+ -- Harpoon with telescope enabled
993+ {
994+ ' ThePrimeagen/harpoon' ,
995+ branch = ' harpoon2' ,
996+ dependencies = { ' nvim-lua/plenary.nvim' },
997+ config = function ()
998+ local harpoon = require ' harpoon'
999+
1000+ -- REQUIRED
1001+ harpoon :setup ()
1002+ -- REQUIRED
1003+ -- basic telescope configuration
1004+ local conf = require (' telescope.config' ).values
1005+ local function toggle_telescope (harpoon_files )
1006+ local file_paths = {}
1007+ for _ , item in ipairs (harpoon_files .items ) do
1008+ table.insert (file_paths , item .value )
1009+ end
1010+
1011+ require (' telescope.pickers' )
1012+ .new ({}, {
1013+ prompt_title = ' Harpoon' ,
1014+ finder = require (' telescope.finders' ).new_table {
1015+ results = file_paths ,
1016+ },
1017+ previewer = conf .file_previewer {},
1018+ sorter = conf .generic_sorter {},
1019+ })
1020+ :find ()
1021+ end
1022+
1023+ -- basic telescope configuration
1024+ vim .keymap .set (' n' , ' <leader>ha' , function ()
1025+ harpoon :list ():add ()
1026+ end , { desc = ' [H]arpoon [A]dd' })
1027+ vim .keymap .set (' n' , ' <leader>hs' , function ()
1028+ toggle_telescope (harpoon :list ())
1029+ end , { desc = ' [H]arpoon [S]how' })
1030+ vim .keymap .set (' n' , ' <leader>he' , function ()
1031+ harpoon .ui :toggle_quick_menu (harpoon :list ())
1032+ end , { desc = ' [H]arpoon [E]dit' })
1033+ end ,
1034+ },
9661035
9671036 -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
9681037 -- init.lua. If you want these files, they are in the repository, so you can just download them and
@@ -1011,6 +1080,15 @@ require('lazy').setup({
10111080 },
10121081 },
10131082})
1014-
1083+ vim .lsp .config (' vue_ls' , {
1084+ filetypes = { ' typescript' , ' javascript' , ' javascriptreact' , ' typescriptreact' , ' vue' },
1085+ init_options = {
1086+ vue = {
1087+ hybridMode = false ,
1088+ },
1089+ },
1090+ capabilities = require (' blink.cmp' ).get_lsp_capabilities (),
1091+ })
1092+ vim .lsp .enable ' vue_ls'
10151093-- The line beneath this is called `modeline`. See `:help modeline`
10161094-- vim: ts=2 sts=2 sw=2 et
0 commit comments