···55#font_family MesloLGS NF Regular
66italic_font MesloLGS NF Italic
7788-font_size 12.0
88+font_size 14.0
991010# hide top bar
1111hide_window_decorations titlebar-only
+37-7
nvim/init.vim
···41414242" should be installed out of the box by neovim?
4343Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
4444+" cmp plugins
4545+Plug 'neovim/nvim-lspconfig'
4646+Plug 'hrsh7th/cmp-nvim-lsp'
4747+Plug 'hrsh7th/cmp-buffer'
4848+Plug 'hrsh7th/cmp-path'
4949+Plug 'hrsh7th/cmp-cmdline'
5050+Plug 'hrsh7th/nvim-cmp'
44514552"Plug 'ambv/black'
4653Plug 'psf/black', { 'branch': 'stable' }
···8592Plug 'liuchengxu/vim-which-key'
8693Plug 'github/copilot.vim'
8794"Markdown (or any Outline
8888-Plug 'simrat39/symbols-outline.nvim'
9595+"Plug 'simrat39/symbols-outline.nvim'
9696+Plug 'stevearc/aerial.nvim'
8997"Plug 'vimwiki/vimwiki'
9098call plug#end()
9199"install with :PlugInstall
···120128set timeoutlen=500 " By default timeoutlen is 1000 ms
121129122130123123-"set foldmethod=line
124124-125131126132"general
127133let mapleader = "\<Space>"
···140146set numberwidth=5
141147set relativenumber
142148143143-149149+"fold settings
150150+"set foldnestmax=2
151151+set foldmethod=indent
152152+set foldlevel=3
153153+nnoremap <Leader>z za
154154+vnoremap <Leader>z zf
155155+map z1 :set foldlevel=0<CR><Esc>
156156+map z2 :set foldlevel=1<CR><Esc>
157157+map z3 :set foldlevel=2<CR><Esc>
158158+map z4 :set foldlevel=3<CR><Esc>
159159+map z5 :set foldlevel=4<CR><Esc>
160160+map z6 :set foldlevel=5<CR><Esc>
161161+map z7 :set foldlevel=6<CR><Esc>
162162+map z8 :set foldlevel=7<CR><Esc>
163163+map z9 :set foldlevel=8<CR><Esc>
144164"
145165" REMAPS
146166" Swiss keyboard remap
···271291272292" Alternate way to save
273293nnoremap <C-s> :w<CR>
294294+nnoremap <C-r> q:
295295+296296+274297" Select all
275298nmap <C-a> gg<S-v>G
276299" Alternate way to quit
···336359let g:floaterm_keymap_toggle = '<F10>'
337360338361" Outline Shortcut
339339-nmap <leader>o :SymbolsOutline<CR>
362362+nmap <leader>oo :CocList outline methods<CR>
363363+nmap <leader>o :AerialToggle<CR>
364364+autocmd FileType markdown nmap <leader>o :SymbolsOutline<CR>
340365341366" fzf: ctrl f for find files
342367nnoremap <C-p> :Files<CR>
343368" this will quick search content of files
344344-nnoremap <C-f> :CtrlSF
369369+nnoremap <leader>f :CtrlSF
345370346371" Split window
347372nmap ss :split<Return>
···382407" nnoremap <C-p> <cmd>Telescope find_files<cr>
383408384409"ranger nvim
385385-nnoremap <leader>f :RnvimrToggl<CR>
410410+nnoremap <leader>e :RnvimrToggl<CR>
411411+"
386412" Replace `$EDITOR` candidate with this command to open the selected file
387413let g:rnvimr_edit_cmd = 'drop'
388414···482508" lua plugins settings
483509lua require('plugins.bufferline')
484510lua require('plugins.indent-blankline')
511511+"lua require('plugins.symbols-outline')
512512+lua require('plugins.aerial')
513513+lua require('plugins.treesitter')
514514+lua require('plugins.cmp')
485515486516487517set encoding=utf8
+19
nvim/lua/plugins/aerial.lua
···11+require('aerial').setup({
22+ on_attach = function(bufnr)
33+ -- Toggle the aerial window with <leader>a
44+ vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>o', '<cmd>AerialToggle!<CR>', {})
55+ -- Jump forwards/backwards with '{' and '}'
66+ vim.api.nvim_buf_set_keymap(bufnr, 'n', '{', '<cmd>AerialPrev<CR>', {})
77+ vim.api.nvim_buf_set_keymap(bufnr, 'n', '}', '<cmd>AerialNext<CR>', {})
88+ -- Jump up the tree with '[[' or ']]'
99+ vim.api.nvim_buf_set_keymap(bufnr, 'n', '[[', '<cmd>AerialPrevUp<CR>', {})
1010+ vim.api.nvim_buf_set_keymap(bufnr, 'n', ']]', '<cmd>AerialNextUp<CR>', {})
1111+ end
1212+1313+})
1414+1515+-- Set up your LSP clients here, using the aerial on_attach method
1616+require("lspconfig").vimls.setup{
1717+ on_attach = require("aerial").on_attach,
1818+}
1919+-- Repeat this for each language server you have configured
+131
nvim/lua/plugins/cmp.lua
···11+local cmp_status_ok, cmp = pcall(require, "cmp")
22+if not cmp_status_ok then
33+ return
44+end
55+66+local snip_status_ok, luasnip = pcall(require, "luasnip")
77+if not snip_status_ok then
88+ return
99+end
1010+1111+--require("luasnip/loaders/from_vscode").lazy_load()
1212+1313+local check_backspace = function()
1414+ local col = vim.fn.col "." - 1
1515+ return col == 0 or vim.fn.getline("."):sub(col, col):match "%s"
1616+end
1717+1818+-- פּ ﯟ some other good icons
1919+local kind_icons = {
2020+ Text = "",
2121+ Method = "m",
2222+ Function = "",
2323+ Constructor = "",
2424+ Field = "",
2525+ Variable = "",
2626+ Class = "",
2727+ Interface = "",
2828+ Module = "",
2929+ Property = "",
3030+ Unit = "",
3131+ Value = "",
3232+ Enum = "",
3333+ Keyword = "",
3434+ Snippet = "",
3535+ Color = "",
3636+ File = "",
3737+ Reference = "",
3838+ Folder = "",
3939+ EnumMember = "",
4040+ Constant = "",
4141+ Struct = "",
4242+ Event = "",
4343+ Operator = "",
4444+ TypeParameter = "",
4545+}
4646+-- find more here: https://www.nerdfonts.com/cheat-sheet
4747+4848+cmp.setup {
4949+ snippet = {
5050+ expand = function(args)
5151+ luasnip.lsp_expand(args.body) -- For `luasnip` users.
5252+ end,
5353+ },
5454+ mapping = {
5555+ ["<C-k>"] = cmp.mapping.select_prev_item(),
5656+ ["<C-j>"] = cmp.mapping.select_next_item(),
5757+ ["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
5858+ ["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
5959+ ["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
6060+ ["<C-y>"] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
6161+ ["<C-e>"] = cmp.mapping {
6262+ i = cmp.mapping.abort(),
6363+ c = cmp.mapping.close(),
6464+ },
6565+ -- Accept currently selected item. If none selected, `select` first item.
6666+ -- Set `select` to `false` to only confirm explicitly selected items.
6767+ ["<CR>"] = cmp.mapping.confirm { select = true },
6868+ ["<Tab>"] = cmp.mapping(function(fallback)
6969+ if cmp.visible() then
7070+ cmp.select_next_item()
7171+ elseif luasnip.expandable() then
7272+ luasnip.expand()
7373+ elseif luasnip.expand_or_jumpable() then
7474+ luasnip.expand_or_jump()
7575+ elseif check_backspace() then
7676+ fallback()
7777+ else
7878+ fallback()
7979+ end
8080+ end, {
8181+ "i",
8282+ "s",
8383+ }),
8484+ ["<S-Tab>"] = cmp.mapping(function(fallback)
8585+ if cmp.visible() then
8686+ cmp.select_prev_item()
8787+ elseif luasnip.jumpable(-1) then
8888+ luasnip.jump(-1)
8989+ else
9090+ fallback()
9191+ end
9292+ end, {
9393+ "i",
9494+ "s",
9595+ }),
9696+ },
9797+ formatting = {
9898+ fields = { "kind", "abbr", "menu" },
9999+ format = function(entry, vim_item)
100100+ -- Kind icons
101101+ vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
102102+ -- 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
103103+ vim_item.menu = ({
104104+ nvim_lsp = "[LSP]",
105105+ luasnip = "[Snippet]",
106106+ buffer = "[Buffer]",
107107+ path = "[Path]",
108108+ })[entry.source.name]
109109+ return vim_item
110110+ end,
111111+ },
112112+ sources = {
113113+ { name = "nvim_lsp" },
114114+ { name = "luasnip" },
115115+ { name = "buffer" },
116116+ { name = "path" },
117117+ },
118118+ confirm_opts = {
119119+ behavior = cmp.ConfirmBehavior.Replace,
120120+ select = false,
121121+ },
122122+ window = {
123123+ documentation = {
124124+ border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
125125+ },
126126+ },
127127+ experimental = {
128128+ ghost_text = false,
129129+ native_menu = false,
130130+ },
131131+}
+17
nvim/lua/plugins/treesitter.lua
···11+local status_ok, configs = pcall(require, "nvim-treesitter.configs")
22+if not status_ok then
33+ return
44+end
55+66+configs.setup({
77+ 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
88+ ignore_install = { "" }, -- List of parsers to ignore installing
99+ highlight = {
1010+ enable = true, -- false will disable the whole extension
1111+ disable = { "css" }, -- list of language that will be disabled
1212+ },
1313+ autopairs = {
1414+ enable = true,
1515+ },
1616+ indent = { enable = true, disable = { "yaml" } },
1717+})