This repository has no description
0

Configure Feed

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

nvim: update with all the good features

+102 -6
+102 -6
tools/nvim.nix
··· 2 2 { 3 3 perSystem = { system, ... }: { 4 4 packages.nvim = inputs.nixvim.legacyPackages.${system}.makeNixvim { 5 - colorschemes.gruvbox.enable = true; 6 - options = { 5 + vimAlias = true; 6 + colorschemes.ayu = { 7 + enable = true; 8 + settings.overrides = { 9 + EoLSpace = { bg = "#883333"; }; 10 + }; 11 + }; 12 + globals.mapleader = " "; 13 + opts = { 7 14 mouse = "a"; 8 - pastetoggle = "<INS>"; 15 + number = true; 16 + shiftwidth = 2; 17 + # undo stuff 9 18 undofile = {}; 10 19 undolevels = 10000; 11 20 undoreload = 10000; 21 + listchars = "tab:⇥ ,extends:❯,precedes:❮,nbsp:␣,trail:·,eol:↲"; 12 22 }; 13 23 extraConfigVim = '' 14 - set list listchars=tab:⇥\ ,extends:❯,precedes:❮,nbsp:␣,trail:· showbreak=¬ 15 24 set et 25 + 26 + " show special characters 27 + set list 28 + 29 + " match trailing whitespace 30 + match EoLSpace /\s\+$/ 31 + 32 + " need to use lua to expand $HOME 33 + lua vim.o.undodir = vim.fs.normalize('$HOME/.vim/undodir') 16 34 ''; 17 - maps.normalVisualOp = { 18 - "<C-c>" = ":q<cr>"; 35 + keymaps = [ 36 + { mode = "n"; key = "<C-c>"; action = ":q<cr>"; } 37 + { mode = "n"; key = "<Space>"; action = "<Nop>"; } 38 + { mode = "n"; key = "<leader>u"; action = ":UndotreeToggle<cr>"; } 39 + { mode = "n"; key = "<leader>cd"; action = ":colorscheme ayu-dark<cr>"; } 40 + { mode = "n"; key = "<leader>cw"; action = ":colorscheme ayu-light<cr>"; } 41 + ]; 42 + plugins.web-devicons.enable = true; 43 + plugins.telescope = { 44 + enable = true; 45 + keymaps = { 46 + "<leader>f" = "find_files"; 47 + "<leader>g" = "live_grep"; 48 + "<leader>b" = "buffers"; 49 + "<leader>h" = "help_tags"; 50 + }; 19 51 }; 20 52 plugins.lsp = { 21 53 enable = true; 54 + servers = { 55 + bashls.enable = true; # bash 56 + nixd.enable = true; # nix 57 + ruff-lsp.enable = true; # python 58 + }; 22 59 }; 60 + plugins.undotree.enable = true; 61 + plugins.treesitter.enable = true; 62 + plugins.copilot-cmp.enable = true; 63 + plugins.copilot-lua.panel.enabled = false; 64 + plugins.copilot-lua.suggestion.enabled = false; 65 + plugins.luasnip.enable = true; 66 + plugins.cmp = { 67 + enable = true; 68 + autoEnableSources = true; 69 + settings = { 70 + autoEnableSources = true; 71 + experimental = { ghost_text = true; }; 72 + performance = { 73 + debounce = 60; 74 + fetchingTimeout = 200; 75 + maxViewEntries = 30; 76 + }; 77 + snippet = { expand = "luasnip"; }; 78 + formatting = { fields = [ "kind" "abbr" "menu" ]; }; 79 + sources = [ 80 + { name = "nvim_lsp"; } 81 + { name = "emoji"; } 82 + { 83 + name = "buffer"; # text within current buffer 84 + option.get_bufnrs.__raw = "vim.api.nvim_list_bufs"; 85 + keywordLength = 3; 86 + } 87 + { 88 + name = "copilot"; # enable/disable copilot 89 + } 90 + { 91 + name = "path"; # file system paths 92 + keywordLength = 3; 93 + } 94 + { 95 + name = "luasnip"; # snippets 96 + keywordLength = 3; 97 + } 98 + ]; 99 + 100 + window = { 101 + completion = { border = "solid"; }; 102 + documentation = { border = "solid"; }; 103 + }; 104 + 105 + mapping = { 106 + "<Tab>" = "cmp.mapping.select_next_item()"; 107 + "<S-Tab>" = "cmp.mapping.select_prev_item()"; 108 + "<C-e>" = "cmp.mapping.abort()"; 109 + "<C-b>" = "cmp.mapping.scroll_docs(-4)"; 110 + "<C-f>" = "cmp.mapping.scroll_docs(4)"; 111 + "<C-Space>" = "cmp.mapping.complete()"; 112 + "<CR>" = "cmp.mapping.confirm({ select = true })"; 113 + "<S-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })"; 114 + }; 115 + }; 116 + }; 117 + plugins.bufferline.enable = true; 118 + plugins.which-key.enable = true; 23 119 }; 24 120 }; 25 121 }