{ pkgs, ... }: # let # customPlugins = { # vim-zettel = pkgs.vimUtils.buildVimPlugin { # name = "vim-zettel"; # src = pkgs.fetchFromGitHub { # owner = "michal-h21"; # repo = "vim-zettel"; # rev = "929d90eec62e6f693c2702d2b6f76a93f2f1689d"; # sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4="; # }; # }; # }; # Thank god I don't use python anymore # my-python-packages = python-packages: with python-packages; [ # # other python packages you want # ]; # python-with-my-packages = pkgs.python3.withPackages my-python-packages; # in { home.sessionVariables.EDITOR = "nvim"; home.shellAliases = { k = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex; cd $OLDPWD"; # kitaab zettel kz = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex -c :ZettelNew; cd $OLDPWD"; # kitaab get by tagged kt = "cd /home/anish/kitaab/vimwiki; eza *_index.wiki | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD"; }; home.file = { # Add %update to the highlight clause for vimwiki files # ".config/nvim/after/syntax/vimwiki.vim".text = '' # " match with %update # syntax match VimwikiPlaceholder /^\s*%update\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite # " match with %link # syntax match VimwikiPlaceholder /^\s*%link\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite # ''; ".config/nvim".source = ./config; }; #environment.systemPackages = with customPlugins; [ tidal ]; programs.neovim = { enable = true; # extraConfig = '' # filetype plugin on # set shortmess+=c # " always show signcolumns # " Pasting # :map sy :!xclip -i # :vmap sy "*y # :map sp :r!xclip -o # " lua config # lua <e'] = map('editor.send_line', {'i', 'n'}), # ['s'] = map_expr('CmdPeriod.run', {'i', 'n'}), # ['t'] = { # map('editor.send_block', {'i', 'n'}), # map('editor.send_selection', 'x'), # }, # [''] = map('postwin.toggle'), # [''] = map('postwin.toggle', 'i'), # [''] = map('postwin.clear', {'n', 'i'}), # [''] = map('signature.show', {'n', 'i'}), # [''] = map('sclang.hard_stop', {'n', 'x', 'i'}), # ['st'] = map('sclang.start'), # ['sk'] = map('sclang.recompile'), # [''] = map_expr('s.boot'), # [''] = map_expr('s.meter'), # } # } # -- You gotta run :SCNvimGenerateAssets for this first # -- require("luasnip").add_snippets("supercollider", require("scnvim/utils").get_snippets()) # -- zen mode # require('zen-mode').setup{ # window = { # backdrop = 1.0, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal # -- height and width can be: # -- * an absolute number of cells when > 1 # -- * a percentage of the width / height of the editor when <= 1 # -- * a function that returns the width or the height # width = 120, -- width of the Zen window # height = 1, -- height of the Zen window # -- by default, no options are changed for the Zen window # -- uncomment any of the options below, or add other vim.wo options you want to apply # options = { # signcolumn = "no", -- disable signcolumn # number = false, -- disable number column # relativenumber = false, -- disable relative numbers # cursorline = false, -- disable cursorline # cursorcolumn = false, -- disable cursor column # foldcolumn = "0", -- disable fold column # list = false, -- disable whitespace characters # }, # }, # plugins = { # -- disable some global vim options (vim.o...) # -- comment the lines to not apply the options # options = { # enabled = true, # ruler = false, -- disables the ruler text in the cmd line area # showcmd = false, -- disables the command in the last line of the screen # }, # twilight = { enabled = true }, -- enable to start Twilight when zen mode opens # gitsigns = { enabled = false }, -- disables git signs # tmux = { enabled = false }, -- disables the tmux statusline # -- this will change the font size on kitty when in zen mode # -- to make this work, you need to set the following kitty options: # -- - allow_remote_control socket-only # -- - listen_on unix:/tmp/kitty # kitty = { # enabled = true, # font = "+2", -- font size increment # }, # }, # } # require('twilight').setup{} # -- hologram # require('hologram').setup{ # auto_display = false -- WIP automatic markdown image display, may be prone to breaking # } # EOF # ''; extraPackages = with pkgs; [ # used to compile tree-sitter grammar # python-with-my-packages nodejs clojure-lsp clojure clj-kondo terraform-lsp gopls gcc shellcheck proselint statix nodePackages.typescript nodePackages.typescript-language-server luajitPackages.lua-lsp fennel-ls # starpls-bin # TODO find this!! ]; plugins = with pkgs.vimPlugins; [ #hotpot hotpot-nvim # ui lualine-nvim neo-tree-nvim fzf-vim vim-devicons nvim-web-devicons telescope-nvim plenary-nvim nvim-navic FTerm-nvim barbar-nvim # TODO # neotree neovim-ayu rainbow_parentheses-vim vim-surround undotree (nvim-treesitter.withPlugins (p: [ p.nix p.clojure p.fennel p.lua p.html p.css p.regex p.supercollider p.beancount p.markdown p.glsl p.yaml p.toml p.dockerfile p.json ])) nvim-treesitter-context auto-session which-key-nvim zen-mode-nvim twilight-nvim # TODO remove? vim-dasht # language vim-nix emmet-vim csv-vim direnv-vim conjure # kitaab stuff vimwiki vim-zettel hologram-nvim # lsp stuff # nvim-lint null-ls-nvim nvim-lspconfig nvim-cmp cmp-nvim-lsp cmp-treesitter nvim-lsp-ts-utils lspsaga-nvim cmp-conjure cmp-buffer cmp-path cmp-spell nvim-autopairs cmp_luasnip luasnip lsp-format-nvim friendly-snippets lspkind-nvim # git stuff vim-fugitive gitsigns-nvim fzf-checkout-vim # Clojure stuff # conjure vim-sexp vim-sexp-mappings-for-regular-people fennel-vim vim-tidal # experimental nvim-luapad scnvim leap-nvim vim-beancount # vimtex # custom # nvim-parinfer # vim-processing ]; # withPython3 = true; # extraPython3Packages = pkgs: with pkgs; [ tasklib six ]; # vimAlias = true; }; }