diff options
Diffstat (limited to '')
-rw-r--r-- | lua/conf/binds.lua | 33 | ||||
-rw-r--r-- | lua/conf/opts.lua | 1 | ||||
-rw-r--r-- | lua/conf/plugins.lua | 22 |
3 files changed, 33 insertions, 23 deletions
diff --git a/lua/conf/binds.lua b/lua/conf/binds.lua index 3e9a3aa..11c791c 100644 --- a/lua/conf/binds.lua +++ b/lua/conf/binds.lua @@ -93,15 +93,8 @@ if pcall(require, "telescope") then -- search for vim options map('n', '<leader>sv', telebuilt.vim_options, { desc = 'Find vim options.' }) -- search for string in project - map('n', '<leader>sp', function() - vim.ui.input({ prompt = 'Find string in project' }, function(input) - if not input or input == '' then - vim.notify('No query!', vim.log.levels.WARN, { title = misc.appid }) - return nil - end - telebuilt.grep_string({ search = input }) - end) - end, { desc = 'Find string in project.' }) + map('n', '<leader>sp', telebuilt.live_grep, { desc = 'Find string in project.' }) + -- Code Actions (requires telescope) if pcall(require, "actions-preview") then map({ "n", "v" }, "<leader>ca", require("actions-preview").code_actions, { @@ -110,6 +103,24 @@ if pcall(require, "telescope") then end end +-- harpoon +if pcall(require, 'harpoon') then + local mark = require("harpoon.mark") + local ui = require("harpoon.ui") + + map("n", "<leader>a", function() + mark.add_file() + vim.notify('added new file to quickmarks', vim.log.levels.INFO, { + title = misc.appid, + }) + end) + map("n", "<C-e>", ui.toggle_quick_menu) + map('n', '<C-q>', function() ui.nav_file(1) end) + map('n', '<C-g>', function() ui.nav_file(2) end) + map('n', '<C-h>', function() ui.nav_file(3) end) + map('n', '<C-i>', function() ui.nav_file(4) end) +end + map('n', '<leader>u', '<cmd>UndotreeToggle<CR>', { desc = 'Open undo tree.' }) map('n', '<leader>f', '<cmd>SFMToggle<CR>', { desc = 'Open file tree view.' }) map('n', '<leader>b', '<cmd>JABSOpen<CR>', { desc = 'Switch between buffers.' }) @@ -119,10 +130,6 @@ if pcall(require, "smart-splits") then map('n', '<leader>r', smartsplits.start_resize_mode) end --- toggle term (don't use leader key in these binds) -map({'n', 't'}, '<C-\\>', '<cmd>ToggleTerm direction=float<CR>') -map({'n', 't'}, '<C-g>', '<cmd>lua _glow()<CR>') - -- git map('n', '<leader>gp', '<cmd>Gitsigns preview_hunk_inline<CR>') map('n', '<leader>gs', '<cmd>Gitsigns stage_hunk<CR>') diff --git a/lua/conf/opts.lua b/lua/conf/opts.lua index 3997b5f..d229bcf 100644 --- a/lua/conf/opts.lua +++ b/lua/conf/opts.lua @@ -36,6 +36,7 @@ misc.colorscheme('mellow') -- better editing ------------------------------------------------------------- o.clipboard = 'unnamedplus' -- system clipboard o.splitkeep = "screen" -- keep same text on screen when spliting +o.updatetime = 200 -- file saving ---------------------------------------------------------------- o.swapfile = false diff --git a/lua/conf/plugins.lua b/lua/conf/plugins.lua index 45b1433..4b2bcf1 100644 --- a/lua/conf/plugins.lua +++ b/lua/conf/plugins.lua @@ -7,7 +7,7 @@ require('dep') { }, -- colorschemes ------------------------------------------------------------- - { 'kvrohit/mellow.nvim', + { 'mellow-theme/mellow.nvim', requires = 'nvim-treesitter/nvim-treesitter' }, @@ -32,17 +32,19 @@ require('dep') { -- functional plugins ------------------------------------------------------- { 'lewis6991/gitsigns.nvim' }, -- very helpful git things - { 'squibid/git-yodel', -- git cache diff preview when in commit buffer - url = 'https://git.squi.bid/git-yodel', - }, { 'chentoast/marks.nvim' }, -- marks in gutter { 'vidocqh/auto-indent.nvim' }, -- better tabbing into indents { 'mbbill/undotree' }, -- careful this one is written in vimscript { 'dhruvasagar/vim-table-mode' }, -- same with this one - { 'windwp/nvim-autopairs' }, + { 'altermo/ultimate-autopair.nvim', -- autopairs + branch = 'v0.6' + }, { 'numToStr/Comment.nvim' }, { 'ahmedkhalf/project.nvim' }, -- cd into root of project { 'mrjones2014/smart-splits.nvim'}, -- buffer resizing + { 'ThePrimeagen/harpoon', -- super duper fast navigation through files + requires = 'nvim-lua/plenary.nvim' + }, -- note taking -------------------------------------------------------------- { 'nvim-neorg/neorg', @@ -82,7 +84,6 @@ require('dep') { -- treesitter + colorizing -------------------------------------------------- { 'nvim-treesitter/nvim-treesitter', deps = { - 'm-demare/hlargs.nvim', 'Wansmer/treesj', 'nvim-treesitter/nvim-treesitter-context' } @@ -98,19 +99,20 @@ require('dep') { 'lukas-reineke/cmp-under-comparator', -- better results 'hrsh7th/cmp-buffer', -- buffers 'FelipeLema/cmp-async-path', -- path - 'hrsh7th/cmp-calc', -- calculator 'hrsh7th/cmp-nvim-lsp', -- lsp - 'uga-rosa/cmp-dictionary', -- dictionary 'hrsh7th/cmp-nvim-lua', -- nvim lua api { 'doxnit/cmp-luasnip-choice', -- luasnip - requires = 'L3MON4D3/LuaSnip' + requires = 'L3MON4D3/LuaSnip', } }, }, -- snippets ----------------------------------------------------------------- { 'L3MON4D3/LuaSnip', - deps = 'rafamadriz/friendly-snippets' + deps = 'rafamadriz/friendly-snippets', + config = function() + vim.cmd('make install_jsregexp') + end }, -- lsp ---------------------------------------------------------------------- |