From 06c096754889b3066ff4023ef71acba633236b42 Mon Sep 17 00:00:00 2001 From: Robert Altner Date: Wed, 4 Dec 2024 10:33:33 +0100 Subject: [PATCH] add bookmarks to startify --- init.vim | 3 ++- lua/init.lua | 8 +++++++- lua/keymap.lua | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/init.vim b/init.vim index 1eead7f..b2a8d22 100644 --- a/init.vim +++ b/init.vim @@ -25,8 +25,9 @@ set nofoldenable colorscheme kanagawa let g:blamer_enabled = 1 -let g:startify_change_to_dir = 0 +let g:startify_change_to_dir = 1 let g:startify_change_to_vcs_root = 1 +let g:startify_bookmarks = map(filter(globpath('/home/robert/repos', "*", 0, 1), 'isdirectory(v:val)'), {_,val -> { split(val, '/')[-1]: val}}) inoremap coc#pum#visible() ? coc#pum#prev(1) : "" inoremap coc#pum#visible() ? coc#pum#next(1) : "" diff --git a/lua/init.lua b/lua/init.lua index ea61825..f5727b2 100644 --- a/lua/init.lua +++ b/lua/init.lua @@ -28,13 +28,13 @@ vim.filetype.add({ local colors = require("tokyonight.colors").setup() require("editorconfig").properties.trim_trailing_whitespace = false +require('neoscroll').setup() require("nvim-tree").setup({ update_focused_file = { enable = true } }) -require('neoscroll').setup() require'nvim-treesitter.configs'.setup { ensure_installed = { "c", "go", "typescript" }, @@ -137,3 +137,9 @@ vim.api.nvim_create_autocmd("TermClose", { }) require("ibl").setup() + +vim.g.barbar_auto_setup = false + +require'barbar'.setup { + letters = 'asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERUTYQP' +} diff --git a/lua/keymap.lua b/lua/keymap.lua index abb5797..926a718 100644 --- a/lua/keymap.lua +++ b/lua/keymap.lua @@ -15,7 +15,7 @@ map("n", "", ":TagbarToggle") map("n", "e", ":CocList diagnostics") map("n", "", ":Telescope find_files") -map("n", "s", ":Telescope live_grep glob_pattern=*.{ts,html,c,h,go,json,py,sh,lua,vim,rs,txt}") +map("n", "s", ":Telescope live_grep glob_pattern=*.{ts,html,c,cc,cpp,h,go,json,py,sh,lua,vim,rs,txt}") map("n", "sc", ":noh") @@ -58,3 +58,5 @@ map("v", "", ":m '<-2gv=gv") map('n', 'p', 'BufferPick', opts) map('n', 'd', 'BufferPickDelete', opts) + +map('n', 'g', ':DiffviewOpen')