diff --git a/home-manager/roles/default.nix b/home-manager/roles/default.nix index 5233f003..6bd202a1 100644 --- a/home-manager/roles/default.nix +++ b/home-manager/roles/default.nix @@ -10,7 +10,6 @@ ../../common ./unlock.nix ./mpclient.nix - ./neovim ./helix.nix ./nvd.nix ]; diff --git a/home-manager/roles/helix.nix b/home-manager/roles/helix.nix index 40cf60c2..0f7b49b6 100644 --- a/home-manager/roles/helix.nix +++ b/home-manager/roles/helix.nix @@ -67,6 +67,8 @@ in { indent-guides.render = true; cursorline = true; color-modes = true; + bufferline = "multiple"; + auto-save = true; }; }; languages = [ diff --git a/home-manager/roles/neovim/default.nix b/home-manager/roles/neovim/default.nix deleted file mode 100644 index a2e57fc0..00000000 --- a/home-manager/roles/neovim/default.nix +++ /dev/null @@ -1,121 +0,0 @@ -{ - pkgs, - config, - ... -}: let - cocSettings = { - "diagnostic.maxWindowHeight" = 60; - "diagnostic.virtualText" = true; - "diagnostic.virtualTextCurrentLineOnly" = false; - "codeLens.enable" = true; - languageserver = { - haskell = { - command = "haskell-language-server"; - args = ["--lsp" "-d" "-l" "/tmp/LanguageServer.log"]; - rootPatterns = [".hie-bios" "cabal.project"]; - filetypes = ["hs" "lhs" "haskell"]; - settings.languageServerHaskell.formattingProvider = "fourmolu"; - }; - }; - explorer.icon.enableNerdfont = true; - explorer.file.child.template = "[git | 2] [selection | clip | 1] [indent][icon | 1] [diagnosticError & 1][diagnosticWarning & 1][filename omitCenter 1][modified][readonly] [linkIcon & 1][link growRight 1 omitCenter 5][size]"; - }; -in { - imports = [./spelling.nix]; - programs.neovim = { - enable = true; - vimAlias = true; - vimdiffAlias = true; - extraConfig = builtins.readFile ./vimrc; - plugins = builtins.attrValues { - inherit - (pkgs.vimPlugins) - # coc-tabnine (TODO: Why doesn‘t it work?) - - # TODO: tabnine config in home-manager - - # TODO: tabnine lsp: nix, rust, pandoc/latex lsp? was noch? - - # === - - # Basic IDE plugins - - coc-nvim - airline - # same word highlighting when not supported by language - - coc-highlight - coc-explorer - # searches - - coc-fzf - fzf-vim - # general whitespace - - vim-trailing-whitespace - vim-autoformat - # Git - - coc-git - # statusline, numberline and explorer infos - - fugitive - # various git commands - - # Commenting and Uncommenting - - nerdcommenter - # Theme - - papercolor-theme - vim-airline-themes - LanguageTool-nvim - vim-css-color - vista-vim - # === - - # Languages - - # haskell syntax highlighting - - haskell-vim - vim-hoogle - # nix syntax highlighting - - vim-nix - vim-markdown - # latex - - vimtex - coc-vimtex - # not sure if I need two - - # ledger - - vim-ledger - # rust - - coc-rls - # python - - coc-python - # css - - coc-css - # yaml - - coc-yaml - # json - - coc-json - # html - - coc-html - # dhall - - dhall-vim - ; - }; - }; - xdg.configFile."nvim/coc-settings.json".text = builtins.toJSON cocSettings; -} diff --git a/home-manager/roles/neovim/spelling.nix b/home-manager/roles/neovim/spelling.nix deleted file mode 100644 index 28303eab..00000000 --- a/home-manager/roles/neovim/spelling.nix +++ /dev/null @@ -1,26 +0,0 @@ -{config, ...}: let - nvim-spell-de-utf8-dictionary = builtins.fetchurl { - url = "http://ftp.vim.org/vim/runtime/spell/de.utf-8.spl"; - sha256 = "1ld3hgv1kpdrl4fjc1wwxgk4v74k8lmbkpi1x7dnr19rldz11ivk"; - }; - - nvim-spell-de-utf8-suggestions = builtins.fetchurl { - url = "http://ftp.vim.org/vim/runtime/spell/de.utf-8.sug"; - sha256 = "0j592ibsias7prm1r3dsz7la04ss5bmsba6l1kv9xn3353wyrl0k"; - }; - - nvim-spell-de-latin1-dictionary = builtins.fetchurl { - url = "http://ftp.vim.org/vim/runtime/spell/de.latin1.spl"; - sha256 = "0hn303snzwmzf6fabfk777cgnpqdvqs4p6py6jjm58hdqgwm9rw9"; - }; - - nvim-spell-de-latin1-suggestions = builtins.fetchurl { - url = "http://ftp.vim.org/vim/runtime/spell/de.latin1.sug"; - sha256 = "0mz07d0a68fhxl9vmy1548vnbayvwv1pc24zhva9klgi84gssgwm"; - }; -in { - home.file."${config.xdg.configHome}/nvim/spell/de.utf-8.spl".source = nvim-spell-de-utf8-dictionary; - home.file."${config.xdg.configHome}/nvim/spell/de.utf-8.sug".source = nvim-spell-de-utf8-suggestions; - home.file."${config.xdg.configHome}/nvim/spell/de.latin1.spl".source = nvim-spell-de-latin1-dictionary; - home.file."${config.xdg.configHome}/nvim/spell/de.latin1.sug".source = nvim-spell-de-latin1-suggestions; -} diff --git a/home-manager/roles/neovim/vimrc b/home-manager/roles/neovim/vimrc deleted file mode 100644 index 0315f293..00000000 --- a/home-manager/roles/neovim/vimrc +++ /dev/null @@ -1,236 +0,0 @@ -set spell spelllang=de,en -let g:airline_powerline_fonts = 1 -let g:airline_skip_empty_sections = 1 -let g:airline#extensions#tabline#enabled = 1 -let g:airline#extensions#nvimlsp#enabled = 0 -let g:tex_flavor = 'latex' - -function! MyExplorer() - if &filetype == 'coc-explorer' - wincmd w - else - CocCommand explorer --no-toggle - endif -endfunction - -no e :call MyExplorer() -no v :Vista coc - -set nofoldenable -set background=light -set autoindent -set nosmartindent -set listchars=tab:»\ ,trail:.,extends:# -set list -set ts=3 -set number -set scrolloff=5 -set sidescrolloff=5 -set laststatus=2 -set incsearch -set mouse= -set showcmd -set title - -" Set this here so that nothing get’s overriden later -filetype plugin indent on -syntax on - -set undodir=~/.vimhist/ -set undofile -set undolevels=100 -set undoreload=1000 - -augroup focus - au! - au TabLeave * silent! wall - au FocusLost * silent! wall - au BufLeave * silent! wall -augroup END - -no :nohlsearch -vno < >gv -no -no -no -no -let mapleader="," - - -set winaltkeys=no -set noai -set cursorline -set cursorcolumn -set si -set expandtab -set sw=3 -set pt= -set ignorecase -set wildmenu -set hlsearch - -no gk -no gj -no g -no g -let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1 -let g:haskell_enable_quantification = 1 " to enable highlighting of `forall` -let g:haskell_enable_recursivedo = 1 " to enable highlighting of `mdo` and `rec` -let g:haskell_enable_arrowsyntax = 1 " to enable highlighting of `proc` -let g:haskell_enable_pattern_synonyms = 1 " to enable highlighting of `pattern` -let g:haskell_enable_typeroles = 1 " to enable highlighting of type roles -let g:haskell_enable_static_pointers = 1 " to enable highlighting of `static` -let g:haskell_backpack = 1 " to enable highlighting of backpack keywords - -let g:formatdef_my_cabal = '"cabal-fmt"' -let g:formatters_cabal = ['my_cabal'] -let g:formatdef_my_nix = '"nixfmt"' -let g:formatters_nix = ['my_nix'] -let g:formatdef_my_dhall = '"dhall format"' -let g:formatters_dhall = ['my_dhall'] - -let g:autoformat_autoindent = 0 -let g:autoformat_retab = 0 - -let g:languagetool_server_command = "languagetool-http-server" - -colorscheme PaperColor - -highlight CursorColumn ctermbg=8 -highlight CursorLine ctermbg=8 - -" if hidden is not set, TextEdit might fail. -set hidden - -" Some servers have issues with backup files, see #649 -set nobackup -set nowritebackup - -" You will have bad experience for diagnostic messages when it's default 4000. -set updatetime=300 - -" don't give |ins-completion-menu| messages. -set shortmess+=c - -" always show signcolumns -set signcolumn=yes - -" Use tab for trigger completion with characters ahead and navigate. -" Use command ':verbose imap ' to make sure tab is not mapped by other plugin. -ino - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() -ino pumvisible() ? "\" : "\" - -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -" Use to trigger completion. -ino coc#refresh() - -" Use to confirm completion, `u` means break undo chain at current position. -" Coc only does snippet and additional edit on confirm. -ino pumvisible() ? "\" : "\u\" - -no gp :call CocAction('diagnosticPrevious') -no gn :call CocAction('diagnosticNext') - -" Remap keys for gotos -no gd :call CocAction('jumpDefinition') -no gt :call CocAction('jumpTypeDefinition') -no gr :call CocAction('jumpReferences') - -no gs :Git status -no gu :CocCommand git.chunkUndo -no gi :CocCommand git.chunkInfo -no ga :CocCommand git.chunkStage -no gb :CocCommand git.showCommit -no gc :Git commit - -function! s:show_documentation() - if (index(['vim','help'], &filetype) >= 0) - elseif (coc#rpc#ready()) - call CocActionAsync('definitionHover') - else - execute '!' . &keywordprg . " " . expand('') - endif -endfunction - -no i :call show_documentation() - - -augroup mygroup - autocmd! - " Setup formatexpr specified filetype(s). - autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') - " Update signature help on jump placeholder - autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') -augroup end - -no f :call CocAction('format') -no l :call CocAction('codeLensAction') - -" FZF ctrl-p style search -no p :Files -no g :Rg -no h :History -no b :Buffers - -function MyClose() - if &readonly - quit - else - write - quit - endif -endfunction - -function MyCloseAll() - if &readonly - quitall - else - wall - quitall - endif -endfunction -no q :call MyClose() -no k :call MyCloseAll() -no s :w - -no :bp -no :bn -ino :bp -ino :bn - -" Use for select selections ranges, needs server support, like: coc-tsserver, coc-python -no (coc-range-select) -xno (coc-range-select) -xno (coc-range-select-backword) - - -" Use `:Fold` to fold current buffer -command! -nargs=? Fold :call CocAction('fold', ) - -" use `:OR` for organize import of current buffer -command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') - -ino [1~ -ino [4~ -" Using CocList -" Show all diagnostics -no d :CocFzfList diagnostics -" Show commands -no c :CocFzfList commands -" Find symbol of current document -no o :Vista finder coc -" Find symbol of current document -no a :CocAction - -ino - -" Load this after theme -hi Normal ctermbg=NONE diff --git a/nix/sources.json b/nix/sources.json index 9065dfe4..c9e420f7 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -86,15 +86,15 @@ "url_template": "https://github.com///archive/.tar.gz" }, "nixos-unstable": { - "branch": "nixos-unstable", + "branch": "71a7e0ea4ebaedf330bfdfe7261ab2b93a868a6c", "description": "Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels", "homepage": null, "owner": "NixOS", "repo": "nixpkgs", - "rev": "6e51c97f1c849efdfd4f3b78a4870e6aa2da4198", - "sha256": "0d0alwdd07lsy4jl29wgn0m1z17ah9rwwggh7kpvg7a7skny24lc", + "rev": "71a7e0ea4ebaedf330bfdfe7261ab2b93a868a6c", + "sha256": "0jxg2qj5zn5v4krd6z14spb7kgfs3vn9vglm7v88gfxcp1jjhzs3", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/6e51c97f1c849efdfd4f3b78a4870e6aa2da4198.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/71a7e0ea4ebaedf330bfdfe7261ab2b93a868a6c.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs-bot": {