clone of my dotfiles.ssp.sh
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

update cmp, outline for code, treesiter, aerilal and short cuts

sspaeti fe7a0e39 ae5e59f2

+205 -8
+1 -1
kitty/custom_kitty.conf
··· 5 5 #font_family MesloLGS NF Regular 6 6 italic_font MesloLGS NF Italic 7 7 8 - font_size 12.0 8 + font_size 14.0 9 9 10 10 # hide top bar 11 11 hide_window_decorations titlebar-only
+37 -7
nvim/init.vim
··· 41 41 42 42 " should be installed out of the box by neovim? 43 43 Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} 44 + " cmp plugins 45 + Plug 'neovim/nvim-lspconfig' 46 + Plug 'hrsh7th/cmp-nvim-lsp' 47 + Plug 'hrsh7th/cmp-buffer' 48 + Plug 'hrsh7th/cmp-path' 49 + Plug 'hrsh7th/cmp-cmdline' 50 + Plug 'hrsh7th/nvim-cmp' 44 51 45 52 "Plug 'ambv/black' 46 53 Plug 'psf/black', { 'branch': 'stable' } ··· 85 92 Plug 'liuchengxu/vim-which-key' 86 93 Plug 'github/copilot.vim' 87 94 "Markdown (or any Outline 88 - Plug 'simrat39/symbols-outline.nvim' 95 + "Plug 'simrat39/symbols-outline.nvim' 96 + Plug 'stevearc/aerial.nvim' 89 97 "Plug 'vimwiki/vimwiki' 90 98 call plug#end() 91 99 "install with :PlugInstall ··· 120 128 set timeoutlen=500 " By default timeoutlen is 1000 ms 121 129 122 130 123 - "set foldmethod=line 124 - 125 131 126 132 "general 127 133 let mapleader = "\<Space>" ··· 140 146 set numberwidth=5 141 147 set relativenumber 142 148 143 - 149 + "fold settings 150 + "set foldnestmax=2 151 + set foldmethod=indent 152 + set foldlevel=3 153 + nnoremap <Leader>z za 154 + vnoremap <Leader>z zf 155 + map z1 :set foldlevel=0<CR><Esc> 156 + map z2 :set foldlevel=1<CR><Esc> 157 + map z3 :set foldlevel=2<CR><Esc> 158 + map z4 :set foldlevel=3<CR><Esc> 159 + map z5 :set foldlevel=4<CR><Esc> 160 + map z6 :set foldlevel=5<CR><Esc> 161 + map z7 :set foldlevel=6<CR><Esc> 162 + map z8 :set foldlevel=7<CR><Esc> 163 + map z9 :set foldlevel=8<CR><Esc> 144 164 " 145 165 " REMAPS 146 166 " Swiss keyboard remap ··· 271 291 272 292 " Alternate way to save 273 293 nnoremap <C-s> :w<CR> 294 + nnoremap <C-r> q: 295 + 296 + 274 297 " Select all 275 298 nmap <C-a> gg<S-v>G 276 299 " Alternate way to quit ··· 336 359 let g:floaterm_keymap_toggle = '<F10>' 337 360 338 361 " Outline Shortcut 339 - nmap <leader>o :SymbolsOutline<CR> 362 + nmap <leader>oo :CocList outline methods<CR> 363 + nmap <leader>o :AerialToggle<CR> 364 + autocmd FileType markdown nmap <leader>o :SymbolsOutline<CR> 340 365 341 366 " fzf: ctrl f for find files 342 367 nnoremap <C-p> :Files<CR> 343 368 " this will quick search content of files 344 - nnoremap <C-f> :CtrlSF 369 + nnoremap <leader>f :CtrlSF 345 370 346 371 " Split window 347 372 nmap ss :split<Return> ··· 382 407 " nnoremap <C-p> <cmd>Telescope find_files<cr> 383 408 384 409 "ranger nvim 385 - nnoremap <leader>f :RnvimrToggl<CR> 410 + nnoremap <leader>e :RnvimrToggl<CR> 411 + " 386 412 " Replace `$EDITOR` candidate with this command to open the selected file 387 413 let g:rnvimr_edit_cmd = 'drop' 388 414 ··· 482 508 " lua plugins settings 483 509 lua require('plugins.bufferline') 484 510 lua require('plugins.indent-blankline') 511 + "lua require('plugins.symbols-outline') 512 + lua require('plugins.aerial') 513 + lua require('plugins.treesitter') 514 + lua require('plugins.cmp') 485 515 486 516 487 517 set encoding=utf8
+19
nvim/lua/plugins/aerial.lua
··· 1 + require('aerial').setup({ 2 + on_attach = function(bufnr) 3 + -- Toggle the aerial window with <leader>a 4 + vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>o', '<cmd>AerialToggle!<CR>', {}) 5 + -- Jump forwards/backwards with '{' and '}' 6 + vim.api.nvim_buf_set_keymap(bufnr, 'n', '{', '<cmd>AerialPrev<CR>', {}) 7 + vim.api.nvim_buf_set_keymap(bufnr, 'n', '}', '<cmd>AerialNext<CR>', {}) 8 + -- Jump up the tree with '[[' or ']]' 9 + vim.api.nvim_buf_set_keymap(bufnr, 'n', '[[', '<cmd>AerialPrevUp<CR>', {}) 10 + vim.api.nvim_buf_set_keymap(bufnr, 'n', ']]', '<cmd>AerialNextUp<CR>', {}) 11 + end 12 + 13 + }) 14 + 15 + -- Set up your LSP clients here, using the aerial on_attach method 16 + require("lspconfig").vimls.setup{ 17 + on_attach = require("aerial").on_attach, 18 + } 19 + -- Repeat this for each language server you have configured
+131
nvim/lua/plugins/cmp.lua
··· 1 + local cmp_status_ok, cmp = pcall(require, "cmp") 2 + if not cmp_status_ok then 3 + return 4 + end 5 + 6 + local snip_status_ok, luasnip = pcall(require, "luasnip") 7 + if not snip_status_ok then 8 + return 9 + end 10 + 11 + --require("luasnip/loaders/from_vscode").lazy_load() 12 + 13 + local check_backspace = function() 14 + local col = vim.fn.col "." - 1 15 + return col == 0 or vim.fn.getline("."):sub(col, col):match "%s" 16 + end 17 + 18 + --   פּ ﯟ   some other good icons 19 + local kind_icons = { 20 + Text = "", 21 + Method = "m", 22 + Function = "", 23 + Constructor = "", 24 + Field = "", 25 + Variable = "", 26 + Class = "", 27 + Interface = "", 28 + Module = "", 29 + Property = "", 30 + Unit = "", 31 + Value = "", 32 + Enum = "", 33 + Keyword = "", 34 + Snippet = "", 35 + Color = "", 36 + File = "", 37 + Reference = "", 38 + Folder = "", 39 + EnumMember = "", 40 + Constant = "", 41 + Struct = "", 42 + Event = "", 43 + Operator = "", 44 + TypeParameter = "", 45 + } 46 + -- find more here: https://www.nerdfonts.com/cheat-sheet 47 + 48 + cmp.setup { 49 + snippet = { 50 + expand = function(args) 51 + luasnip.lsp_expand(args.body) -- For `luasnip` users. 52 + end, 53 + }, 54 + mapping = { 55 + ["<C-k>"] = cmp.mapping.select_prev_item(), 56 + ["<C-j>"] = cmp.mapping.select_next_item(), 57 + ["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }), 58 + ["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }), 59 + ["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), 60 + ["<C-y>"] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping. 61 + ["<C-e>"] = cmp.mapping { 62 + i = cmp.mapping.abort(), 63 + c = cmp.mapping.close(), 64 + }, 65 + -- Accept currently selected item. If none selected, `select` first item. 66 + -- Set `select` to `false` to only confirm explicitly selected items. 67 + ["<CR>"] = cmp.mapping.confirm { select = true }, 68 + ["<Tab>"] = cmp.mapping(function(fallback) 69 + if cmp.visible() then 70 + cmp.select_next_item() 71 + elseif luasnip.expandable() then 72 + luasnip.expand() 73 + elseif luasnip.expand_or_jumpable() then 74 + luasnip.expand_or_jump() 75 + elseif check_backspace() then 76 + fallback() 77 + else 78 + fallback() 79 + end 80 + end, { 81 + "i", 82 + "s", 83 + }), 84 + ["<S-Tab>"] = cmp.mapping(function(fallback) 85 + if cmp.visible() then 86 + cmp.select_prev_item() 87 + elseif luasnip.jumpable(-1) then 88 + luasnip.jump(-1) 89 + else 90 + fallback() 91 + end 92 + end, { 93 + "i", 94 + "s", 95 + }), 96 + }, 97 + formatting = { 98 + fields = { "kind", "abbr", "menu" }, 99 + format = function(entry, vim_item) 100 + -- Kind icons 101 + vim_item.kind = string.format("%s", kind_icons[vim_item.kind]) 102 + -- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind 103 + vim_item.menu = ({ 104 + nvim_lsp = "[LSP]", 105 + luasnip = "[Snippet]", 106 + buffer = "[Buffer]", 107 + path = "[Path]", 108 + })[entry.source.name] 109 + return vim_item 110 + end, 111 + }, 112 + sources = { 113 + { name = "nvim_lsp" }, 114 + { name = "luasnip" }, 115 + { name = "buffer" }, 116 + { name = "path" }, 117 + }, 118 + confirm_opts = { 119 + behavior = cmp.ConfirmBehavior.Replace, 120 + select = false, 121 + }, 122 + window = { 123 + documentation = { 124 + border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" }, 125 + }, 126 + }, 127 + experimental = { 128 + ghost_text = false, 129 + native_menu = false, 130 + }, 131 + }
+17
nvim/lua/plugins/treesitter.lua
··· 1 + local status_ok, configs = pcall(require, "nvim-treesitter.configs") 2 + if not status_ok then 3 + return 4 + end 5 + 6 + configs.setup({ 7 + ensure_installed = {"python", "markdown", "markdown_inline", "css", "html", "javascript", "yaml", "bash", "json", "lua", "regex", "sql", "toml", "vim"}, -- one of "all" or a list of languages 8 + ignore_install = { "" }, -- List of parsers to ignore installing 9 + highlight = { 10 + enable = true, -- false will disable the whole extension 11 + disable = { "css" }, -- list of language that will be disabled 12 + }, 13 + autopairs = { 14 + enable = true, 15 + }, 16 + indent = { enable = true, disable = { "yaml" } }, 17 + })