diff --git a/home/profiles/nvim/config/conf/formatting.fnl b/home/profiles/nvim/config/conf/formatting.fnl new file mode 100644 index 00000000..e69de29b diff --git a/home/profiles/nvim/config/conf/init.fnl b/home/profiles/nvim/config/conf/init.fnl new file mode 100644 index 00000000..e52fb287 --- /dev/null +++ b/home/profiles/nvim/config/conf/init.fnl @@ -0,0 +1,29 @@ +(local nvim (require :lib/nvim)) + +(nvim.g :mapleader " ") + +(nvim.opt :runtimepath (.. vim.opt.runtimepath "/home/anish/.config/nvim/,")) +(nvim.opt :tabstop 2) +(nvim.opt :showmatch) +(nvim.opt :shiftwidth 2) +(nvim.opt :autoindent) +(nvim.opt :undofile) +(nvim.opt :signcolumn "auto:4") +(nvim.opt :title) +(nvim.opt :number) +(nvim.opt :nocompatible) +(nvim.opt :relativenumber) +(nvim.opt :showtabline 2) +(nvim.opt :expandtab) +(nvim.opt :autowriteall) + +(nvim.opt :lisp) ; include - in word to move better in snake-case) +(nvim.g :sexp_filetypes "clojure,scheme,lisp,janet,fennel,yuck") ; include the lisps I use + +(nvim.opt :termguicolors) +(nvim.colorscheme "ayu-mirage") + +(require :conf.plugins) +(require :conf.mappings) +(require :conf.lsp) +(require :conf.formatting) diff --git a/home/profiles/nvim/config/conf/lsp.fnl b/home/profiles/nvim/config/conf/lsp.fnl new file mode 100644 index 00000000..a9eb8fe0 --- /dev/null +++ b/home/profiles/nvim/config/conf/lsp.fnl @@ -0,0 +1,7 @@ + +; Set Diagnostics +; local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } +; for type, icon in pairs(signs) do +; local hl = "DiagnosticSign" .. type +; vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl}) +; end diff --git a/home/profiles/nvim/config/conf/mappingns.fnl b/home/profiles/nvim/config/conf/mappingns.fnl new file mode 100644 index 00000000..e739149c --- /dev/null +++ b/home/profiles/nvim/config/conf/mappingns.fnl @@ -0,0 +1,84 @@ +(local nvim (require :lib/nvim)) +(local wk (require :which-key)) + +(local + normal-map-leader + {"t" ["" + "Toggle neo-tree"] + "w" [":w" + "Write file"] + "q" [":q" + "Quit"] + "r" [":RainbowParenthesesToggleAll" + "Toggle Rainbow Parens"] + ; Telescope + "f" {:Name "Files" + :f ["Telescope find_files" + "Find Files (in Telescope)"] + :g ["Telescope live_grep" + "Find Grep (in Telescope)"] + :b ["Telescope buffers" + "Find Buffers"] + :h ["Telescope help_tags" + "Find Help"] + :t ["Telescope tags" + "Find Tags"] + :r ["Telescope oldfiles" + "Recent files"]} + ; Git + "g" {:Name "Git" + "s" [":G" + "Git Status"] + "f" [":G fetch --all" + "Git Fetch"] + "b" [":GBranches" + "Git Branch"] + "p" [":Git! push" + "Git Push"] + "d" [":GDiff" + "Git Diff"] + "h" ["" + "Commit Hunk under Cursor"]} + ; nmap gl :diffget //3 + ; nmap gh :diffget //2 + ; nnoremap gc :G commit -v -q %:p + ; Buffers + "b" {:Name "Buffer" + :a ["" + "Buffer Add"] + :q ["" + "Buffer Quit"] + :n ["" + "Buffer Next"] + :N [":tabp" + "Buffer Previous"] + :p [":tabp" + "Buffer Previous"]} + ; Search + "s" {:Name "Search" + :b ["Telescope current_buffer_fuzzy_find" + "Search in current buffer"] + :s ["Telescope live_grep" + "Search in project"] + :t ["TodoTelescope" + "Search TODOs in project"] + :c ["let @/ = \"\":echo 'Search highlight cleared'" + "Clear search"]} + ; Code + "c" {:Name "Code" + :d [":lua vim.lsp.buf.definition()" + "Go to Definition"] + :i [":lua require('telescope.builtin').lsp_implementation()" + "Implementation"] + :s [":lua vim.lsp.buf.signature_help()" + "Signature Help"] + :r [":Lspsaga rename" + "Rename Symbol"] + :h [":Lspsaga hover_doc" + "Hover doc"] + :o [":LSoutlineToggle" + "Outline"]} + ; Kitaab + "z" {:Name "Kitaab"}}) + +(wk.register normal-map-leader {:prefix ""}) diff --git a/home/profiles/nvim/config/conf/plugins.fnl b/home/profiles/nvim/config/conf/plugins.fnl new file mode 100644 index 00000000..d1d2a49e --- /dev/null +++ b/home/profiles/nvim/config/conf/plugins.fnl @@ -0,0 +1,3 @@ +(local nvim (require :lib/nvim)) + +(nvim.g :tidal_target "terminal") diff --git a/home/profiles/nvim/config/init.lua b/home/profiles/nvim/config/init.lua new file mode 100644 index 00000000..986fcf3e --- /dev/null +++ b/home/profiles/nvim/config/init.lua @@ -0,0 +1,37 @@ +-- A function that applies passes the output of string.format to the print +-- function +---@param string string #template string +local function fprint(string, ...) + print(string.format(string, ...)) +end + +if pcall(require, "hotpot") then + -- Setup hotpot.nvim + require("hotpot").setup({ + provide_require_fennel = true, + -- show fennel compiler results in when editing fennel files + enable_hotpot_diagnostics = true, + compiler = { + -- options passed to fennel.compile for modules, defaults to {} + modules = { + -- not default but recommended, align lua lines with fnl source + -- for more debuggable errors, but less readable lua. + correlate = true + }, + macros = { + -- allow macros to access vim global, needed for nyoom modules + env = "_COMPILER", + compilerEnv = _G, + allowGlobals = true, + }, + } + }) + -- Import neovim configuration + require("conf") +else + print("Unable to require hotpot") +end + +-- vim.cmd[[colorscheme tokyonight]] +-- -- vim.cmd[[colorscheme lumona]] +-- vim.cmd[[packadd cfilter]] diff --git a/home/profiles/nvim/config/lib/nvim.fnl b/home/profiles/nvim/config/lib/nvim.fnl new file mode 100644 index 00000000..c62cbe3e --- /dev/null +++ b/home/profiles/nvim/config/lib/nvim.fnl @@ -0,0 +1,37 @@ +(fn autocmd [events opts] + "Create autocommand" + (vim.api.nvim_create_autocmd events opts)) + +(fn clear-autocmds [opts] + "Clear autocommands" + (vim.api.nvim_clear_autocmds opts)) + +(fn augroup [name ?opts] + "Create autocommand group" + (vim.api.nvim_create_augroup name (or opts {}))) + +(fn keymap [mode lhs rhs ?opts] + "Sets a global mapping for the given mode. + Ex: `(keymap [:n :i] ...)`" + (let [string-mode (table.concat mode)] + (vim.api.nvim_set_keymap string-mode lhs rhs (or opts {})))) + +(fn opt [key value] + "Set a vim option" + (tset vim.opt key value)) + +(fn g [key value] + "Set a vim global" + (tset vim.g key value)) + +(fn colorscheme [name] + "Set the current colorscheme" + (vim.cmd (.. "colorscheme " name))) + +{: autocmd + : clear-autocmds + : augroup + : keymap + : opt + : g + : colorscheme} diff --git a/home/profiles/nvim/default.nix b/home/profiles/nvim/default.nix index a2597b1f..1fb93446 100644 --- a/home/profiles/nvim/default.nix +++ b/home/profiles/nvim/default.nix @@ -1,158 +1,32 @@ { 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="; - }; - }; - lsp-format = pkgs.vimUtils.buildVimPlugin { - name = "lsp-format"; - src = pkgs.fetchFromGitHub { - owner = "lukas-reineke"; - repo = "lsp-format.nvim"; - rev = "84e117b99bb2bc0d0c8122e2b256046f046f8aff"; - sha256 = "rs3NTZwWdsmBGXnrgUeVxUiNjbN/ULxJHifPYJD9mT4="; - }; - }; - my-lspsaga = pkgs.vimUtils.buildVimPlugin { - name = "lspsaga.nvim"; - src = pkgs.fetchFromGitHub { - owner = "glepnir"; - repo = "lspsaga.nvim"; - rev = "b7b4777369b441341b2dcd45c738ea4167c11c9e"; - sha256 = "sciX/fMxzY1YOxXxjj1+ymrdMi451avcFFu+14R+/pk="; - }; - }; - nvim-luapad = pkgs.vimUtils.buildVimPlugin { - name = "nvim-luapad"; - src = pkgs.fetchFromGitHub { - owner = "rafcamlet"; - repo = "nvim-luapad"; - rev = "9815e2659ce8e2ef4b55e401531cf09b6423e0ea"; - sha256 = "gMaS5YFi3+gmUIfkCMEt9vhm8XSgv54Cquv5+WCWeTo="; - }; - }; - leap = pkgs.vimUtils.buildVimPlugin { - name = "leap"; - src = pkgs.fetchFromGitHub { - owner = "ggandor"; - repo = "leap.nvim"; - rev = "1bb1fec369b1e9ae96e6ff1b829ea9272c51f844"; - sha256 = "dH0v1D5q5OlMLA/omTDMb/taKyIgQ5VfVMYXJ609k/k="; - }; - }; - nvim-navic = pkgs.vimUtils.buildVimPlugin { - name = "nvim-navic"; - src = pkgs.fetchFromGitHub { - owner = "SmiteshP"; - repo = "nvim-navic"; - rev = "096b23e73c84a653fd317c0c10261875fa573a6d"; - sha256 = "vX7ZVJxgatIicmijehtaRvyHxk1i4gFfXrbPM/+VoFc="; - }; - }; - my-which-key-nvim = pkgs.vimUtils.buildVimPlugin { - pname = "which-key.nvim"; - version = "2022-05-04"; - src = pkgs.fetchFromGitHub { - owner = "folke"; - repo = "which-key.nvim"; - rev = "bd4411a2ed4dd8bb69c125e339d837028a6eea71"; - sha256 = "0vf685xgdb967wmvffk1pfrvbhg1jkvzp1kb7r0vs90mg8gpv1aj"; - }; - meta.homepage = "https://github.com/folke/which-key.nvim/"; - }; - scnvim = pkgs.vimUtils.buildVimPlugin { - pname = "scnvim"; - version = "2022-06-04"; - src = pkgs.fetchFromGitHub { - owner = "davidgranstrom"; - repo = "scnvim"; - rev = "746cc0db820d02a9c36b8f9ba2eac9725fa73107"; - sha256 = "kvSwS6FNUY2Ue84NhWLLcm0ldLMSp4WqQ7s6TUoX6Cc="; - }; - }; - yuck-vim = pkgs.vimUtils.buildVimPlugin { - pname = "yuck.vim"; - version = "2021-08-09"; - src = pkgs.fetchFromGitHub { - owner = "elkowar"; - repo = "yuck.vim"; - rev = "6dc3da77c53820c32648cf67cbdbdfb6994f4e08"; - sha256 = "lp7qJWkvelVfoLCyI0aAiajTC+0W1BzDhmtta7tnICE="; - }; - }; - nvim-parinfer = pkgs.vimUtils.buildVimPlugin { - pname = "nvim-parinfer"; - version = "v1.2.0"; - src = pkgs.fetchFromGitHub { - owner = "gpanders"; - repo = "nvim-parinfer"; - rev = "82bce5798993f4fe5ced20e74003b492490b4fe8"; - sha256 = "Dlzfp3CZTzq8zQeHByWf3ER6/Em+KNGYNI4Z17ui8Lc="; - }; - }; - my-marks = pkgs.vimUtils.buildVimPlugin { - pname = "marks"; - version = "2022-08-31"; - src = pkgs.fetchFromGitHub { - owner = "chentoast"; - repo = "marks.nvim"; - rev = "b27cbb78e9082229590b396d3ae4fe07f1aeafe0"; - sha256 = "XdbgIWuAHNdTfyKDrKmQVq5oSbBoi56DpwtgOqhScAk="; - }; - }; - my-fterm = pkgs.vimUtils.buildVimPlugin { - pname = "fterm"; - version = "2022-07-22"; - src = pkgs.fetchFromGitHub { - owner = "numToStr"; - repo = "FTerm.nvim"; - rev = "efd10656724a269e21ba68d65e2b058a4e606424"; - sha256 = "rR6KDwj58aYfyaSsoUy75536SdBhk394yspCUl/hzfE="; - }; - }; - my-nvim-peekup = pkgs.vimUtils.buildVimPlugin { - pname = "nvim-peekup"; - version = "0.1.0"; - src = pkgs.fetchFromGitHub { - owner = "gennaro-tedesco"; - repo = "nvim-peekup"; - rev = "73a67c1ee3b5a7ea7b42d85399bf093f428c8ee3"; - sha256 = "czKjJgCpvRSdtR7rNGlJrluDgPIdx94KUyx33op5gdY="; - }; - }; - }; +# 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 - my-python-packages = python-packages: with python-packages; [ - tasklib - pynvim - six - pylsp-mypy - #pyls-isort - #pyls-black - black - isort - # 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 recents - kr = "cd /home/anish/kitaab/vimwiki; eza --sort=modified --reverse | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';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"; - # List files that have no links in them - ku = "cd /home/anish/kitaab/;vim ./vimwiki/$(python3 poonam/main.py report --titles=false | tail -n +4 | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./vimwiki/{}');cd $OLDPWD"; }; # Add %update to the highlight clause for vimwiki files home.file.".config/nvim/after/syntax/vimwiki.vim".text = '' @@ -167,33 +41,8 @@ in enable = true; extraConfig = '' - " so our custom files still get included - set runtimepath+=/home/anish/.config/nvim/ - set tabstop=2 - set showmatch - set shiftwidth=2 - set noexpandtab - set autoindent - set undofile - set signcolumn=auto:4 - set title - - " set foldmethod=indent " fold based on indent - set number - set nocompatible - set relativenumber - set showtabline=2 - set noexpandtab - set autowriteall - set list lcs=tab:\|\ filetype plugin on - " include - in word to move across easier in lisp / clojure - set iskeyword+=- - - set termguicolors - colorscheme ayu-mirage - " set spell set spelllang=en_gb set ignorecase @@ -215,59 +64,6 @@ in " highlight row set cursorline - let mapleader = "\" - let maplocalleader = "," - - " window - nmap wh :topleft vnew - nmap wl :botright vnew - nmap wk :topleft new - nmap wj :botright new - - " tabs - nmap rt :retab! - vmap rt :retab! - - " moving splits with vim movements. - :tnoremap h - :tnoremap j - :tnoremap k - :tnoremap l - :inoremap h - :inoremap j - :inoremap k - :inoremap l - :nnoremap h - :nnoremap j - :nnoremap k - :nnoremap l - :nnoremap "=strftime("%Y-%m-%d %H:%M") - :inoremap =strftime("%Y-%m-%d %H:%M") - :inoremap =strftime("%H:%M") - - " tidal nvim terminal - let g:tidal_target = "terminal" - - " latex - " let g:tex_flavor='latex' - " let g:vimtex_view_method='zathura' - " let g:vimtex_quickfix_mode=0 - " set conceallevel=1 - " let g:tex_conceal='abdmg' - - " telescope - " Find files using Telescope command-line sugar. - nnoremap ff Telescope find_files - nnoremap fg Telescope live_grep - nnoremap fb Telescope buffers - nnoremap fh Telescope help_tags - nnoremap ft Telescope tags - - " exit normal mode in terminal - :tnoremap - - " Sexp in Conjure (since it's fennel) - let g:sexp_filetypes = "clojure,scheme,lisp,janet,fennel,yuck" let g:conjure#filetype#fennel = "conjure.client.fennel.stdio" " we only use fennel with love; no we don't... let g:conjure#client#fennel#stdio#command = "fennel" @@ -278,10 +74,6 @@ in autocmd BufReadPost,BufNewFile c,clj,cljs RainbowParenthesesToggleAll " general commands - map t :NERDTreeToggle - map s :w - map q :q - map r :RainbowParenthesesToggleAll nnoremap :noh map Q nnoremap Y y$ @@ -319,16 +111,6 @@ in nnoremap gj :BufferPick nnoremap gq :BufferClose - " git - nnoremap ga :G fetch --all - nmap gs :G - nmap gl :diffget //3 - nmap gh :diffget //2 - nmap gb :GBranches - nnoremap gp :Git! push - nnoremap gd :Gdiff - nnoremap gc :G commit -v -q %:p - " kitaab map cz :VimwikiIndex:ZettelNew map zs :ZettelSearch @@ -338,100 +120,16 @@ in map wt :VimwikiMakeTomorrowDiaryNote map wd :VimwikiMakeYesterdayDiaryNote map zm :ZenMode:setlocal nospell - let g:vimwiki_list = [{ 'path': '~/kitaab/vimwiki', 'auto_tags': 1, 'auto_diary_index': 1, 'auto_generate_links': 1 }] + let g:vimwiki_list = [{ 'path': '~/kitaab/vimwiki', 'auto_tags': 1, 'auto_diary_index': 1, 'auto_generate_links': 0, 'nested_syntaxes': {'python': 'python', 'c++': 'cpp', 'nix': 'nix', 'bash': 'sh'} }] let g:sync_taskwarrior = 0 let g:zettel_format = "%y%m%d-%H%M" - let g:vimwiki_list = [{'path': '~/kitaab/vimwiki', 'nested_syntaxes': {'python': 'python', 'c++': 'cpp', 'nix': 'nix', 'bash': 'sh'}}] - let g:mapleader="\" - - " fzf - " not sure we even use this - let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } } - - " lsp commands - nnoremap vgd :lua vim.lsp.buf.definition() - nnoremap vi :lua require('telescope.builtin').lsp_implementation() - nnoremap vsh :lua vim.lsp.buf.signature_help() - nnoremap vrr :lua require('telescope.builtin').lsp_references() - " nnoremap vrn :lua vim.lsp.buf.rename() - " nnoremap vh :lua vim.lsp.buf.hover() - " nnoremap vca :lua vim.lsp.buf.code_action() - " nnoremap vsd :lua vim.lsp.util.show_line_diagnostics() - " nnoremap vn :lua vim.lsp.diagnostic.goto_next() - " nnoremap va :lua require('telescope.builtin').lsp_code_actions(require('telescope.themes').get_cursor()) - " lspsaga stuff doesn't work - nnoremap vd :Lspsaga peek_definition - nnoremap vrn :Lspsaga rename - nnoremap vh :Lspsaga hover_doc - nnoremap vca :Lspsaga code_action - nnoremap vsd :Lspsaga show_line_diagnostics - nnoremap vs :Dasht - nnoremap vn :Lspsaga diagnostic_jump_prev - nnoremap vo :LSoutlineToggle - - " dashboard - let g:dashboard_custom_header = [ - \' ', - \' ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀', - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⣿⠁⠀⠀⠀⠀⠀⠀⠀⢠⣿⣶⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣧⠀⠀⠀⠀⠀⠀⠀⠀⢻⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⢴⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⡆⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⠈⢿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⠟⠉⠀⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠶⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⢀⣀⡤⠤⠤⠖⣒⠒⡖⠲⡦⣤⣄⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣤⣤⣤⣤⣤⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⣠⢶⠉⠩⢀⣠⡤⠤⠯⠬⠥⣼⣅⡃⠸⠉⠛⡷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⢶⢻⢻⢹⣃⣨⣧⣤⣴⣹⣉⠛⢶⣄⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⣰⠞⠁⢈⡤⠚⠉⠀⠀⠘⣆⡀⠀⡀⠀⠉⠙⠲⢼⣰⢡⣟⢶⣄⠀⠀⠀⠀⠀⠀⠀⢀⣠⠶⡟⣇⣺⠾⠋⠉⠁⠀⠀⠀⠀⠀⠉⠙⠳⢿⣷⣄⠀⠀⠀⠀ ', - \'⠀⢀⡼⡁⢸⣰⠏⠀⠀⠀⠀⠀⠀⠘⡞⠀⠀⠀⠀⠀⠀⠀⠉⠻⣿⡞⡼⣷⣄⠀⠀⠀⣠⣾⠛⠄⣷⠟⠋⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⢠⠀⠈⠻⣧⠀⠀⠀ ', - \'⠀⡼⠁⢀⡼⠁⠀⠀⠀⣀⠤⠖⠛⠛⠛⠛⠓⠲⠤⣄⡀⠀⠀⠀⠀⠻⢷⣿⣿⣷⣤⣾⠹⢌⡷⠛⠁⠀⠀⠀⠀⣀⡤⠔⠛⠉⠉⠈⠉⠛⠲⣄⣇⠀⠀⠙⣷⠀⠀ ', - \'⢰⠷⣀⡜⠁⠀⠀⢀⠞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠲⣤⡀⢀⡤⠚⢻⣿⣿⢣⢈⡴⠋⠀⠀⠀⠀⣠⠔⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⡇⠀⠀⠘⣇⠀ ', - \'⣾⣇⣹⢃⡀⠀⢀⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣷⣾⣞⡇⢹⡼⠋⠀⠀⠀⢠⡴⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⠀⠀⠀⢹⠀ ', - \'⢹⢀⣿⠘⡇⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⢟⢱⢹⡾⠋⠀⠀⠀⣠⣾⣿⣦⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⢸⡀ ', - \'⢸⣅⣯⠀⣆⠀⢸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⢻⣹⢸⡼⠋⠀⠀⠀⢀⡼⢻⣻⣿⡽⡹⠳⢤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡾⠀⠀⠀⢸⠀ ', - \'⠈⣿⣿⡀⠘⠀⠈⣿⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⢾⢻⢿⣿⠟⠋⠀⠀⠀⠀⣠⣟⠘⣿⡏⠋⠻⢥⣃⡎⣽⠻⢦⣄⣀⠀⠀⠀⠀⠀⣀⡴⣾⠃⠀⠀⠀⡼⠀ ', - \'⠀⠙⣎⣧⠀⠀⠀⠈⢻⣍⠓⠲⣶⣶⣶⣶⡖⢋⣿⣏⡧⠞⠋⠁⠀⠀⠀⢀⣤⠞⠁⠈⠻⣷⣧⠀⡀⠀⠉⠓⢧⣇⢰⢈⠙⢻⠒⡖⢲⠚⣍⡴⠃⠀⠀⠀⣴⠃⠀ ', - \'⠀⠀⠙⢾⣷⡀⠀⠀⠀⠈⠙⠓⠾⠿⠾⠿⠿⠚⠉⠁⠀⠀⠀⠀⠀⣠⡴⠛⠁⠀⠀⠀⠀⠀⠙⠷⣝⠣⠀⠀⠀⠈⠉⠒⠶⠾⠤⠧⠼⠚⠉⠀⠀⠀⢀⡴⠃⠀⠀ ', - \'⠀⠀⠀⠀⠙⠿⣦⣀⠀⠀⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⢀⣠⡴⠞⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠶⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⢀⡴⠟⠁⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⠈⠛⠒⠤⠤⣄⣀⣀⣀⣠⠤⠤⠶⠛⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠒⠦⠤⢤⣀⣀⣠⡤⠤⠟⠋⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡶⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⢀⣴⡾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣦⣀⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠘⠻⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⠏⠀⠀⠀⠀⠀⠀⠀⠀⠰⡆⠀⠀⠀⠀⠀⠀⠀⠀⠹⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠽⠟⠁⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠿⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', - \'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⠓⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', - \] - let g:dashboard_default_executive = 'telescope' - nmap ss :SessionSave - nmap sl :SessionLoad - " nnoremap fh :DashboardFindHistory - " nnoremap fm :DashboardJumpMark - " nnoremap cn :DashboardNewFile - autocmd FileType dashboard set showtabline=0 | autocmd WinLeave set showtabline=2 - let g:dashboard_custom_footer = ["Run wild"] - let g:dashboard_custom_section={ - \ 'create_zettel': { - \ 'description': [' Create Zettel SPC c z'], - \ 'command': ':VimwikiIndex' }, - \ 'load_session': { - \ 'description': [' Load Session SPC s l'], - \ 'command': 'SessionLoad' } - \ } let g:scnvim_snippet_format = "luasnip" " lua config lua <', 'lua require("FTerm").toggle()', opts) - map('t', '', 'lua require("FTerm").toggle()', opts) + map('t', '', 'lua require("FTerm").toggle()', opts) -- Custom functions function update_date() @@ -853,20 +551,16 @@ in EOF ''; - extraPackages = with pkgs // customPlugins; [ + extraPackages = with pkgs; [ # used to compile tree-sitter grammar - python-with-my-packages + # python-with-my-packages nodejs clojure-lsp clojure - nil - terraform-lsp - rust-analyzer clj-kondo - zls + terraform-lsp gopls gcc - nodePackages_latest.pyright shellcheck proselint statix @@ -874,47 +568,47 @@ in nodePackages.typescript-language-server luajitPackages.lua-lsp fennel-ls + starpls-bin ]; - plugins = with pkgs.vimPlugins // customPlugins; [ + plugins = with pkgs.vimPlugins; [ # ui lualine-nvim fzf-vim - nerdtree - neovim-ayu - rainbow_parentheses-vim - vim-surround vim-devicons nvim-web-devicons - undotree telescope-nvim plenary-nvim nvim-navic - (nvim-treesitter.withPlugins (p: [ p.nix p.clojure p.python 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 - my-fterm + fterm 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 - my-marks which-key-nvim - nvim-peekup zen-mode-nvim twilight-nvim - my-lspsaga + + # TODO remove? vim-dasht # language vim-nix - vim-elixir emmet-vim csv-vim direnv-vim - zig-vim conjure # kitaab stuff vimwiki - taskwiki vim-zettel hologram-nvim @@ -926,6 +620,7 @@ in cmp-nvim-lsp cmp-treesitter nvim-lsp-ts-utils + lspsaga cmp-conjure cmp-buffer cmp-path @@ -956,13 +651,12 @@ in vim-beancount # vimtex # custom - yuck-vim nvim-parinfer # vim-processing ]; - withPython3 = true; - extraPython3Packages = pkgs: with pkgs; [ tasklib six ]; - vimAlias = true; + # withPython3 = true; + # extraPython3Packages = pkgs: with pkgs; [ tasklib six ]; + # vimAlias = true; }; }