this repo has no description
1
fork

Configure Feed

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

Update flakes

+417 -284
+1
fish/.config/fish/.gitignore
··· 3 3 /fundle 4 4 /functions/fundle.fish 5 5 /fish_variables 6 + /config.fish
-41
fish/.config/fish/config.fish
··· 1 - source (direnv hook fish | psub) 2 - 3 - if not functions -q fundle 4 - eval (curl -sfL https://git.io/fundle-install) 5 - end 6 - fundle plugin 'hauleth/agnoster' 7 - fundle plugin 'oh-my-fish/plugin-foreign-env' 8 - fundle init 9 - 10 - set -gx MIX_XDG 1 11 - 12 - ulimit -n 10480 13 - 14 - # if type nix-locate 2>/dev/null >/dev/null 15 - # function nix_locate_bin --on-event fish_command_not_found 16 - # if not test -t 1 17 - # __fish_default_command_not_found_handler $argv[1] 18 - # end 19 - 20 - # set -l cmd $argv[1] 21 - # set -l attrs (nix-locate --minimal --no-group --type x --type s --top-level --whole-name --at-root "/bin/$cmd") 22 - 23 - # switch (count $attrs) 24 - # case 0 25 - # echo "$cmd: command not found" >&2 26 - # case 1 27 - # echo "Found one package with $cmd, trying to run in 1s" >&2 28 - # sleep 1 29 - # if nix-build --no-out-link -A $attrs "<nixpkgs>" 30 - # nix-shell -p $attrs --run (printf "'%s' " $argv) 31 - # return 32 - # else 33 - # echo "Failed to install nixpkgs.$attrs" 34 - # echo "$cmd: command not found" 35 - # end 36 - # case '*' 37 - # echo "$cmd is not installed. You can find it in:" >&2 38 - # printf "\tnix-env -iA nixpkgs.%s\n" $attrs >&2 39 - # end 40 - # end 41 - # end
-3
fish/.config/fish/functions/e.fish
··· 1 - function e --wrap "$EDITOR" 2 - eval "$EDITOR" $argv 3 - end
-3
fish/.config/fish/functions/g.fish
··· 1 - function g --description 'Less typing more work!' --wrap git 2 - git $argv 3 - end
+1 -1
fish/.config/fish/functions/ix.fish
··· 1 1 function ix 2 - curl --netrc-optional -F 'f:1=<-' ix.io | pbcopy 2 + curl --netrc-optional -F 'f:1=@-' ix.io | pbcopy 3 3 end
-3
fish/.config/fish/functions/map.fish
··· 1 - function map 2 - xargs -n1 $argv 3 - end
-11
fish/.config/fish/functions/mcd.fish
··· 1 - function mcd --description="Create a directory and set CWD" 2 - command mkdir $argv 3 - if test $status = 0 4 - switch $argv[(count $argv)] 5 - case '-*' 6 - case '*' 7 - cd $argv[(count $argv)] 8 - return 9 - end 10 - end 11 - end
+84
flake.lock
··· 1 + { 2 + "nodes": { 3 + "agnoster": { 4 + "inputs": { 5 + "flake-utils": "flake-utils", 6 + "nixpkgs": [ 7 + "nixpkgs" 8 + ] 9 + }, 10 + "locked": { 11 + "lastModified": 1625824140, 12 + "narHash": "sha256-0/FgJlQULIXKhQIt3z3ugAGubgMlwFZa/cjGjiq7BcA=", 13 + "owner": "hauleth", 14 + "repo": "agnoster", 15 + "rev": "7312ebb59769d5ff503fd06b174103f0f7ba368a", 16 + "type": "github" 17 + }, 18 + "original": { 19 + "owner": "hauleth", 20 + "repo": "agnoster", 21 + "type": "github" 22 + } 23 + }, 24 + "darwin": { 25 + "inputs": { 26 + "nixpkgs": [ 27 + "nixpkgs" 28 + ] 29 + }, 30 + "locked": { 31 + "lastModified": 1640117230, 32 + "narHash": "sha256-W7LXeJavyIzNfNaoEsK65sEaCGqE9MVWvK0xSzNR4ls=", 33 + "owner": "lnl7", 34 + "repo": "nix-darwin", 35 + "rev": "5851d9613edf8b2279746c7e5b9faac55ff17e8a", 36 + "type": "github" 37 + }, 38 + "original": { 39 + "owner": "lnl7", 40 + "ref": "master", 41 + "repo": "nix-darwin", 42 + "type": "github" 43 + } 44 + }, 45 + "flake-utils": { 46 + "locked": { 47 + "lastModified": 1623875721, 48 + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", 49 + "owner": "numtide", 50 + "repo": "flake-utils", 51 + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", 52 + "type": "github" 53 + }, 54 + "original": { 55 + "owner": "numtide", 56 + "repo": "flake-utils", 57 + "type": "github" 58 + } 59 + }, 60 + "nixpkgs": { 61 + "locked": { 62 + "lastModified": 1640418986, 63 + "narHash": "sha256-a8GGtxn2iL3WAkY5H+4E0s3Q7XJt6bTOvos9qqxT5OQ=", 64 + "owner": "NixOS", 65 + "repo": "nixpkgs", 66 + "rev": "5c37ad87222cfc1ec36d6cd1364514a9efc2f7f2", 67 + "type": "github" 68 + }, 69 + "original": { 70 + "id": "nixpkgs", 71 + "type": "indirect" 72 + } 73 + }, 74 + "root": { 75 + "inputs": { 76 + "agnoster": "agnoster", 77 + "darwin": "darwin", 78 + "nixpkgs": "nixpkgs" 79 + } 80 + } 81 + }, 82 + "root": "root", 83 + "version": 7 84 + }
+69
flake.nix
··· 1 + { 2 + description = "Hauleth's configuration"; 3 + 4 + inputs = { 5 + nixpkgs.url = "flake:nixpkgs"; 6 + agnoster = { 7 + url = "github:hauleth/agnoster"; 8 + inputs.nixpkgs.follows = "nixpkgs"; 9 + }; 10 + darwin = { 11 + url = "github:lnl7/nix-darwin/master"; 12 + inputs.nixpkgs.follows = "nixpkgs"; 13 + }; 14 + }; 15 + 16 + outputs = 17 + { self, darwin, nixpkgs, agnoster }: 18 + let 19 + configuration = { pkgs, ... }: { 20 + nixpkgs.overlays = [ 21 + agnoster.overlay 22 + (self: super: { nix-direnv = super.nix-direnv.override { enableFlakes = true; }; } ) 23 + ]; 24 + 25 + environment.variables = { 26 + EDITOR = "nvim"; 27 + LESS = "-SRFXi"; 28 + ERL_FLAGS = "-kernel shell_history enabled"; 29 + }; 30 + 31 + launchd.user.agents.plan-sync.serviceConfig = { 32 + ProgramArguments = [ 33 + "/usr/bin/curl" 34 + "--netrc-optional" 35 + "-F" "plan=&lt;/Users/hauleth/.plan" 36 + "https://plan.cat/stdin" 37 + ]; 38 + 39 + WatchPaths = [ 40 + "/Users/hauleth/.plan" 41 + ]; 42 + 43 + StandardErrorPath = "/Users/hauleth/.local/state/launchd/logs/plan-sync.stderr"; 44 + }; 45 + 46 + nix.package = pkgs.nixFlakes; 47 + nix.extraOptions = '' 48 + gc-keep-derivations = true 49 + gc-keep-outputs = true 50 + 51 + keep-outputs = true 52 + keep-derivations = true 53 + 54 + experimental-features = nix-command flakes 55 + ''; 56 + }; 57 + in { 58 + darwinConfigurations."NiunioBook" = darwin.lib.darwinSystem { 59 + system = "x86_64-darwin"; 60 + modules = [ 61 + configuration 62 + ./nix/.config/nixpkgs/darwin/configuration.nix 63 + ]; 64 + }; 65 + 66 + # for convenience 67 + darwinPackages = self.darwinConfigurations."NiunioBook".pkgs; 68 + }; 69 + }
+2
git/.config/git/attributes
··· 1 1 # Elixir 2 2 *.ex diff=elixir 3 3 *.exs diff=elixir 4 + mix.lock merge=binary 4 5 5 6 # Erlang 6 7 *.erl diff=erlang 7 8 *.hrl diff=erlang 9 + rebar.lock merge=binary 8 10 9 11 # TeX 10 12 *.tex diff=tex
+5 -5
git/.config/git/config
··· 1 1 [core] 2 2 commitGraph = true 3 3 pager = "diff-so-fancy | less --tabs=4 -RFX" 4 - commentChar = ";" 5 4 6 5 [init] 7 6 defaultBranch = master ··· 69 68 [commit] 70 69 gpgsign = true 71 70 verbose = true 71 + cleanup = scissors 72 72 73 73 [filter "lfs"] 74 74 clean = git-lfs clean -- %f ··· 95 95 new = blue 96 96 97 97 [color.diff-highlight] 98 - oldNormal = "magenta" 99 - oldHighlight = "magenta ul" 100 - newNormal = "blue" 101 - newHighlight = "blue ul" 98 + oldNormal = "blue" 99 + oldHighlight = "blue reverse" 100 + newNormal = "yellow" 101 + newHighlight = "yellow reverse" 102 102 103 103 [pack] 104 104 useSparse = true
+1
git/.config/git/ignore
··· 70 70 .elixir_ls 71 71 /.direnv 72 72 .vagrant/ 73 + erl_crash.dump
+2
misc/.curlrc
··· 1 1 silent=true 2 + 3 + netrc-optional
+44
nix/.config/nix/registry.json
··· 1 + { 2 + "flakes": [ 3 + { 4 + "from": { 5 + "id": "dotfiles", 6 + "type": "indirect" 7 + }, 8 + "to": { 9 + "path": "/Users/hauleth/Workspace/hauleth/dotfiles", 10 + "type": "path" 11 + } 12 + }, 13 + { 14 + "from": { 15 + "id": "nixpkgs", 16 + "ref": "nixpkgs-unstable", 17 + "type": "indirect" 18 + }, 19 + "to": { 20 + "lastModified": 1636886446, 21 + "narHash": "sha256-4xsVM2H8CG3d/3V+GqDDLDOmb3kdrugbqKVyrg8Q/zc=", 22 + "owner": "NixOS", 23 + "repo": "nixpkgs", 24 + "rev": "5cb226a06c49f7a2d02863d0b5786a310599df6b", 25 + "type": "github" 26 + } 27 + }, 28 + { 29 + "from": { 30 + "id": "nixpkgs", 31 + "type": "indirect" 32 + }, 33 + "to": { 34 + "lastModified": 1640418986, 35 + "narHash": "sha256-a8GGtxn2iL3WAkY5H+4E0s3Q7XJt6bTOvos9qqxT5OQ=", 36 + "owner": "NixOS", 37 + "repo": "nixpkgs", 38 + "rev": "5c37ad87222cfc1ec36d6cd1364514a9efc2f7f2", 39 + "type": "github" 40 + } 41 + } 42 + ], 43 + "version": 2 44 + }
+25 -32
nix/.config/nixpkgs/darwin/configuration.nix
··· 3 3 { 4 4 nixpkgs.config.allowUnfree = true; 5 5 nixpkgs.overlays = [ 6 - (import <neovim-nightly>) 7 6 (import ../overlays/encpipe.nix) 8 7 (import ../overlays/fonts.nix) 9 8 (import ../overlays/git-riff.nix) ··· 15 14 system.keyboard.enableKeyMapping = true; 16 15 system.keyboard.remapCapsLockToControl = true; 17 16 18 - environment.variables = { 19 - EDITOR = "nvim"; 20 - LESS = "-SRFXi"; 21 - ERL_FLAGS = "-kernel shell_history enabled"; 22 - }; 23 - 24 17 # List packages installed in system profile. To search by name, run: 25 18 # $ nix-env -qaP | grep wget 26 19 environment.systemPackages = with pkgs; [ ··· 35 28 entr 36 29 findutils 37 30 fzy 31 + fishPlugins.agnoster 38 32 git-lfs 33 + git-gone 34 + git-branchless 35 + git-revise 39 36 gitAndTools.diff-so-fancy 40 37 gitAndTools.git-imerge 41 38 gitAndTools.git-test ··· 44 41 gitAndTools.tig 45 42 git 46 43 gh 44 + glab 47 45 # git-riff 48 46 gnupg 49 47 imagemagick 50 48 jq 51 49 lnav 52 - neovim-nightly 50 + neovim 53 51 neovim-remote 54 52 noti 55 53 pinentry_mac 54 + qmk 56 55 ripgrep 57 56 universal-ctags 58 57 # w3m 59 - #watchman 58 + # watchman 60 59 weechat 61 60 ]; 62 61 ··· 69 68 iosevka-ss09-term 70 69 ]; 71 70 72 - # Use a custom configuration.nix location. 73 - # $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix 74 - environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix"; 75 - 76 71 # Auto upgrade nix package and the daemon service. 77 72 # services.nix-daemon = { 78 73 # enable = true; ··· 85 80 localhost = "127.0.0.1"; 86 81 }; 87 82 }; 88 - launchd.daemons.dnsmasq.serviceConfig.StandardErrorPath = "/var/log/dnsmasq.log"; 89 83 90 - programs.gnupg = { 91 - agent.enable = false; 92 - agent.enableSSHSupport = true; 84 + programs.gnupg.agent = { 85 + enable = true; 86 + enableSSHSupport = true; 93 87 }; 94 88 95 89 programs.fish = { 96 90 enable = true; 97 - useBabelfish = true; 98 - babelfishPackage = pkgs.babelfish; 91 + 99 92 shellAliases = { 100 93 git = "LC_CTYPE=UTF-8 LANG=C hub"; 94 + g = "git"; 95 + e = "$EDITOR"; 101 96 }; 102 - }; 103 - programs.zsh = { 104 - enable = true; 97 + 98 + shellInit = '' 99 + source (${pkgs.direnv}/bin/direnv hook fish | psub) 100 + 101 + set -gx XDG_RUNTIME_DIR (getconf DARWIN_USER_TEMP_DIR) 102 + set -gx MIX_XDG 1 103 + 104 + test -e $HOME/.iterm2_shell_integration.fish ; and source $HOME/.iterm2_shell_integration.fish 105 + 106 + ulimit -n 10480 107 + ''; 105 108 }; 106 109 107 - nix.package = pkgs.nixFlakes; 108 110 # nix.useSandbox = true; 109 111 nix.sandboxPaths = [ 110 112 "/System/Library/Frameworks" ··· 114 116 "/private/var/tmp" 115 117 "/usr/bin/env" 116 118 ]; 117 - nix.extraOptions = '' 118 - gc-keep-derivations = true 119 - gc-keep-outputs = true 120 - 121 - keep-outputs = true 122 - keep-derivations = true 123 - 124 - experimental-features = nix-command flakes 125 - ''; 126 119 127 120 # Used for backwards compatibility, please read the changelog before changing. 128 121 # $ darwin-rebuild changelog
+3 -4
nix/.config/nixpkgs/overlays/zig-bin.nix
··· 3 3 { 4 4 zig-bin = prev.stdenv.mkDerivation rec { 5 5 pname = "zig"; 6 - version = "0.7.1"; 6 + version = "0.8.0"; 7 7 8 8 src = prev.fetchurl { 9 - url = "https://ziglang.org/download/0.7.1/zig-macos-x86_64-${version}.tar.xz"; 10 - sha256 = "06f57cg121civy397b8yy3m2a19k6d73z6g3cz7z12lpc9sv2p44"; 9 + url = "https://ziglang.org/download/${version}/zig-macos-x86_64-${version}.tar.xz"; 10 + sha256 = "1gkgpii5p67xk1gfajqvkdlnwqih1lylvp4m0czi08ybnmh977r7"; 11 11 }; 12 12 13 13 dontBuild = true; 14 14 15 15 installPhase = '' 16 16 mkdir -p $out/bin 17 - ls -la 18 17 mv zig $out/bin/zig 19 18 mv lib $out/lib 20 19 '';
+1 -2
vim/.config/nvim/after/ftplugin/gitcommit.vim
··· 1 1 setlocal spell 2 - setlocal commentstring=;%s 3 - setlocal comments=:; 2 + let g:gitcommit_cleanup = 'scissors' 4 3 5 4 let b:undo_ftplugin = b:undo_ftplugin . ' | setlocal nospell'
+10
vim/.config/nvim/after/queries/elixir/injections.scm
··· 1 + (unary_operator 2 + operator: "@" 3 + operand: (call 4 + target: ((identifier) @_identifier) 5 + (arguments [ 6 + (string) @markdown 7 + (sigil 8 + _ 9 + (quoted_content) @markdown)])) 10 + (#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc"))
+3
vim/.config/nvim/after/syntax/markdown.vim
··· 1 + " unlet b:current_syntax 2 + " syntax include @toml syntax/toml.vim 3 + " syntax region tomlFrontmatter start=/\%^---\+$/ end=/^---\+$/ keepend contains=@toml
-106
vim/.config/nvim/autoload/plugins.vim
··· 1 - " vi: foldmethod=marker foldlevel=0 2 - let s:current_file = expand('<sfile>') 3 - let s:data_dir = exists('$XDG_DATA_HOME') ? $XDG_DATA_HOME : $HOME . '/.local/share' 4 - 5 - let s:dir = s:data_dir . '/nvim/site' 6 - 7 - if !exists('*plugins#reload') 8 - func! plugins#reload() abort 9 - exec 'source ' . s:current_file 10 - 11 - call plugins#spec() 12 - endfunc 13 - endif 14 - 15 - func! plugins#spec() abort 16 - packadd minpac 17 - 18 - if !exists('g:minpac') 19 - call minpac#init({'dir': s:dir}) 20 - endif 21 - 22 - " Package manager {{{ 23 - call minpac#add('k-takata/minpac', {'type': 'opt'}) 24 - " }}} 25 - " Colorscheme {{{ 26 - call minpac#add('hauleth/blame.vim') " colorscheme 27 - call minpac#add('dylanaraps/wal.vim') " colorscheme 28 - " }}} 29 - " Project navigation {{{ 30 - call minpac#add('tpope/vim-projectionist') " Requires access to VimEnter 31 - call minpac#add('justinmk/vim-dirvish') " Required for opening directories 32 - call minpac#add('tpope/vim-eunuch') 33 - call minpac#add('nvim-lua/popup.nvim') 34 - call minpac#add('nvim-lua/plenary.nvim') 35 - call minpac#add('nvim-telescope/telescope.nvim') 36 - call minpac#add('nvim-telescope/telescope-fzy-native.nvim') 37 - " }}} 38 - " Git {{{ 39 - call minpac#add('tpope/vim-fugitive') 40 - " call minpac#add('TimUntersberger/neogit') 41 - " call minpac#add('nvim-lua/popup.nvim') 42 - " call minpac#add('nvim-lua/plenary.nvim') 43 - " call minpac#add('pwntester/octo.nvim') 44 - " }}} 45 - " Launch screen {{{ 46 - call minpac#add('mhinz/vim-startify') " Required during startup 47 - " }}} 48 - " Languages {{{ 49 - call minpac#add('aklt/plantuml-syntax') " ftplugin 50 - call minpac#add('cespare/vim-toml') " ftplugin 51 - call minpac#add('dag/vim-fish') " ftplugin 52 - call minpac#add('hauleth/vim-elixir', {'branch': 'fix/encode-all-db-options'}) " ftplugin 53 - call minpac#add('pangloss/vim-javascript') " ftplugin 54 - call minpac#add('tpope/vim-cucumber') " ftplugin 55 - call minpac#add('tpope/vim-scriptease', {'type': 'opt'}) " ftplugin 56 - call minpac#add('LnL7/vim-nix') 57 - call minpac#add('bakpakin/fennel.vim') 58 - call minpac#add('nvim-treesitter/nvim-treesitter') 59 - " }}} 60 - " Completion {{{ 61 - " call minpac#add('prabirshrestha/async.vim') " autoload-only 62 - " call minpac#add('prabirshrestha/vim-lsp') 63 - call minpac#add('Shougo/echodoc.vim') 64 - call minpac#add('fcpg/vim-complimentary') " autoload-only 65 - call minpac#add('neovim/nvim-lspconfig') 66 - " }}} 67 - " Code manipulation {{{ 68 - call minpac#add('AndrewRadev/splitjoin.vim', {'rev': 'main'}) 69 - call minpac#add('hauleth/sad.vim') 70 - call minpac#add('tommcdo/vim-exchange') 71 - call minpac#add('tommcdo/vim-lion') 72 - call minpac#add('tpope/vim-commentary') 73 - call minpac#add('tpope/vim-endwise') " Requires access to au FileType 74 - call minpac#add('machakann/vim-sandwich', {'type': 'opt'}) 75 - " }}} 76 - " Movements {{{ 77 - call minpac#add('wellle/targets.vim', {'type': 'opt'}) 78 - call minpac#add('rhysd/clever-f.vim') 79 - call minpac#add('edkolev/erlang-motions.vim') 80 - " }}} 81 - " Task running & quickfix {{{ 82 - call minpac#add('hauleth/asyncdo.vim') 83 - call minpac#add('romainl/vim-qf') 84 - call minpac#add('romainl/vim-qlist') 85 - call minpac#add('Olical/vim-enmasse') 86 - call minpac#add('igemnace/vim-makery') 87 - " }}} 88 - " Splits management {{{ 89 - call minpac#add('t9md/vim-choosewin') 90 - " }}} 91 - " Utils {{{ 92 - call minpac#add('andymass/vim-matchup') 93 - call minpac#add('direnv/direnv.vim') 94 - call minpac#add('hauleth/vim-backscratch') 95 - call minpac#add('https://gitlab.com/hauleth/qfx.vim.git') 96 - call minpac#add('https://gitlab.com/hauleth/smart.vim.git') 97 - call minpac#add('reedes/vim-pencil') 98 - call minpac#add('sgur/vim-editorconfig') " Required during startup 99 - call minpac#add('mbbill/undotree') 100 - call minpac#add('tpope/vim-characterize') 101 - call minpac#add('tpope/vim-dadbod') 102 - call minpac#add('tpope/vim-repeat') " autoload-only plugin 103 - call minpac#add('tpope/vim-rsi') 104 - call minpac#add('vimwiki/vimwiki') 105 - " }}} 106 - endfunc
+29 -11
vim/.config/nvim/fnl/langclient.fnl
··· 3 3 (local utils (require :lspconfig.util)) 4 4 (local picker (require :picker)) 5 5 (import-macros logger :nvim.logger) 6 - (import-macros {: bopt} :nvim.macros) 7 - 8 - (require :lspconfig.erlangls) 6 + (import-macros {: bopt 7 + : augroup 8 + : on} :nvim.macros) 9 9 10 10 (fn capable? [client capability] 11 11 (. client.resolved_capabilities capability)) 12 12 13 - (fn on-attach [client] 13 + ; Disable virtual text for diagnostics 14 + (tset vim.lsp.handlers :textDocument/publishDiagnostics 15 + (vim.lsp.with 16 + vim.lsp.diagnostic.on_publish_diagnostics 17 + {:virtual_text false 18 + :underline true 19 + :signs true})) 20 + 21 + (fn on_attach [client] 14 22 (logger.inspect client) 23 + (augroup lsp-diagnostics 24 + (on CursorHold :* (vim.lsp.diagnostic.show_line_diagnostics))) 15 25 (when (capable? client :hover) 16 26 (bmap :n :K #(vim.lsp.buf.hover))) 17 27 (when (capable? client :goto_definition) ··· 27 37 28 38 (fn nix-cmd [name cmd] 29 39 ["nix-shell" 30 - "-E" (.. "with import <nixpkgs> {}; with (if (builtins.pathExists ./shell.nix) then (import ./shell.nix {}).passthru else (import <nixpkgs> {})); mkShell { buildInputs = [" name "]; }") 40 + "-E" "{ name }: let pkgs = import <nixpkgs> {}; projPkgs = (if (builtins.pathExists ./shell.nix) then (import ./shell.nix { inherit pkgs; }).passthru else {}); in pkgs.mkShell { buildInputs = [(if projPkgs ? ${name} then projPkgs.${name} else pkgs.${name})]; }" 41 + "--argstr" "name" name 31 42 "--run" (or cmd name)]) 43 + 44 + (local capabilities 45 + (->> (vim.lsp.protocol.make_client_capabilities) 46 + ((. (require :cmp_nvim_lsp) :update_capabilities)))) 32 47 33 48 (lsp.rust_analyzer.setup {:cmd (nix-cmd "rust-analyzer") 34 - :on_attach on-attach}) 49 + : capabilities 50 + : on_attach}) 35 51 36 - (lsp.elixirls.setup {:cmd (nix-cmd "elixir_ls" "elixir-ls") 37 - :on_attach on-attach 52 + (lsp.elixirls.setup {:cmd ["elixir-ls"] 53 + : capabilities 54 + : on_attach 38 55 :settings {:elixirLS {:dialyzerEnabled false}}}) 39 56 40 - (lsp.erlangls.setup {:cmd (nix-cmd "erlang-ls" "erlang_ls") 41 - :on_attach on-attach}) 57 + (lsp.erlangls.setup {:cmd ["erlang_ls"] 58 + : capabilities 59 + : on_attach}) 42 60 43 - (lsp.solargraph.setup {:on_attach on-attach}) 61 + (lsp.solargraph.setup {: on_attach})
-13
vim/.config/nvim/fnl/lspconfig/erlangls.fnl.old
··· 1 - (local configs (require :lspconfig.configs)) 2 - (local util (require :lspconfig.util)) 3 - 4 - (fn root-dir [name] 5 - (let [root-pattern (util.root_pattern "rebar.config" ".git")] 6 - (or (root-pattern name) (vim.loop.os_homedir)))) 7 - 8 - (tset configs :erlangls { 9 - :default_config { 10 - :filetypes [:erlang] 11 - :root_dir root-dir 12 - } 13 - })
+85
vim/.config/nvim/fnl/plugins.fnl
··· 1 + (local packer (require :packer)) 2 + 3 + (fn config [cb] 4 + (packer.startup 5 + (fn [-use -use-rocks] 6 + (let [super (fn [f] (fn [name ?opts] (f (vim.tbl_extend :keep {1 name} (or ?opts {}))))) 7 + use (super -use) 8 + use-rocks (super -use-rocks)] 9 + (cb use use-rocks))))) 10 + 11 + (config (fn [use use-rocks] 12 + ; Speedup initialisation 13 + (use :lewis6991/impatient.nvim) 14 + ; Package manager 15 + (use :wbthomason/packer.nvim) 16 + ; Color scheme 17 + (use :hauleth/blame.vim) 18 + ; Project navigation 19 + (use :tpope/vim-projectionist) 20 + (use :justinmk/vim-dirvish) 21 + (use :tpope/vim-eunuch) 22 + 23 + ; File picker 24 + (use :nvim-lua/popup.nvim) 25 + (use :nvim-lua/plenary.nvim) 26 + (use :nvim-telescope/telescope.nvim) 27 + (use :nvim-telescope/telescope-fzy-native.nvim) 28 + 29 + ; Git 30 + (use :tpope/vim-fugitive) 31 + (use :pwntester/octo.nvim) 32 + 33 + ; Launch screen 34 + (use :mhinz/vim-startify) 35 + 36 + ; Languages 37 + (use :elixir-editors/vim-elixir) 38 + (use :nvim-treesitter/nvim-treesitter) 39 + (use :lepture/vim-jinja) 40 + (use :nvim-orgmode/orgmode) 41 + 42 + ; Tree Sitter 43 + (use :neovim/nvim-lspconfig) 44 + (use :nvim-treesitter/playground) 45 + 46 + ; Code manipulation 47 + (use :AndrewRadev/splitjoin.vim) 48 + (use :hauleth/sad.vim) 49 + (use :tommcdo/vim-exchange) 50 + (use :tommcdo/vim-lion) 51 + (use :tpope/vim-commentary) 52 + (use :machakann/vim-sandwich {:opt true}) 53 + (use :hrsh7th/cmp-nvim-lsp) 54 + (use :hrsh7th/cmp-buffer) 55 + (use :hrsh7th/nvim-cmp) 56 + (use :L3MON4D3/LuaSnip) 57 + (use :saadparwaiz1/cmp_luasnip) 58 + 59 + ; Movements 60 + (use :wellle/targets.vim {:opt true}) 61 + (use :rhysd/clever-f.vim) 62 + 63 + ; Task running 64 + (use :hauleth/asyncdo.vim) 65 + (use :romainl/vim-qf) 66 + (use :romainl/vim-qlist) 67 + (use :Olical/vim-enmasse) 68 + (use :igemnace/vim-makery) 69 + 70 + ; Windows 71 + (use :t9md/vim-choosewin) 72 + 73 + ; Utils 74 + (use :andymass/vim-matchup) 75 + (use :direnv/direnv.vim) 76 + (use :hauleth/vim-backscratch) 77 + (use :https://gitlab.com/hauleth/qfx.vim.git) 78 + (use :https://gitlab.com/hauleth/smart.vim.git) 79 + (use :sgur/vim-editorconfig) 80 + (use :mbbill/undotree) 81 + (use :tpope/vim-characterize) 82 + (use :tpope/vim-dadbod) 83 + (use :tpope/vim-repeat) 84 + (use :tpope/vim-rsi) 85 + ))
+36 -35
vim/.config/nvim/fnl/startup.fnl
··· 16 16 : bopt 17 17 : wopt} :nvim.macros) 18 18 19 + (require :plugins) 20 + 19 21 ; Colors 20 22 (ex.colorscheme :blame) 21 23 ··· 23 25 24 26 ; MatchIt must be unloaded for MatchPair to work correctly 25 27 (g :loaded_matchit true) 28 + (g :matchup_surround_enabled true) 29 + 30 + (g :choosewin_label "QWERTYUIOP") 26 31 27 32 ; Colors 28 33 (opt termguicolors) ··· 91 96 (opt sessionoptions "blank,buffers,curdir,folds,tabpages,winsize") 92 97 93 98 ; Folding 94 - (opt foldmethod :syntax) 99 + (opt foldmethod :expr) 100 + (opt foldexpr "nvim_treesitter#foldexpr()") 95 101 (opt foldlevel 999) 96 102 (map :n :<CR> "foldlevel(\".\") ? \"za\" : \"\\<CR>\"" {:expr true}) 97 103 ··· 205 211 206 212 ; Setup Lua extensions 207 213 (let [setup (fn [package object] ((. (require package) :setup) object))] 208 - (setup :nvim-treesitter.configs 209 - {:ensure_installed [:erlang 210 - :elixir 211 - :nix 212 - :typescript 213 - :javascript 214 - :c 215 - :json 216 - :fennel 217 - :html 218 - :css 219 - :yaml 220 - :rust 221 - :toml] 222 - :highlight {:enable true 223 - ; :disable [:elixir] 224 - } 225 - :indent {:enable true}}) 214 + (let [parser-configs (. (require :nvim-treesitter.parsers) :get_parser_configs)] 215 + (tset (parser-configs) :org { 216 + :install_info { 217 + :url "https://github.com/milisims/tree-sitter-org" 218 + :revision "main" 219 + :files [ "src/parser.c" "src/scanner.cc" ]} 220 + :filetype "org"})) 226 221 (setup :startify 227 222 {:lists [{:type "sessions" :header [" Sessions"]} 228 223 {:type "commands" :header [" Wiki"]}] 229 224 :session-dir "~/.local/share/nvim/site/sessions/" 230 225 :session-autoload true 231 226 :session-persistence true 232 - :commands [{:w ["Wiki" "VimwikiIndex"]} 233 - {:d ["Diary" "VimwikiDiaryIndex"]} 234 - {:t ["Today" "VimwikiMakeDiaryNote"]} 235 - {:y ["Yesterday" "VimwikiMakeYesterdayDiaryNote"]} 236 - {:a ["Tomorrow" "VimwikiMakeTomorrowDiaryNote"]}] 237 227 :change-to-dir false 238 228 :change-to-vcs-root true 239 - :fortune-use-unicode true})) 229 + :fortune-use-unicode true}) 230 + (setup :orgmode {}) 231 + (setup :nvim-treesitter.configs 232 + {:ensure_installed :maintained 233 + :highlight { 234 + :enable true 235 + :disable [:elixir] 236 + ; :additional_vim_regex_highlighting [:elixir :erlang :rust] 237 + } 238 + :matchup {:enable true} 239 + :indent {:enable true}})) 240 240 241 - ; Minpac actions 242 - (defcommand PackUpdate {:bar true} 243 - (call :plugins#reload) 244 - (call :minpac#update)) 245 - (defcommand PackClean {:bar true} 246 - (call :plugins#reload) 247 - (call :minpac#clean)) 248 - (defcommand PackStatus {:bar true} 249 - (call :plugins#reload) 250 - (call :minpac#status)) 241 + (let [cmp (require :cmp)] 242 + (cmp.setup 243 + {:sources [{:name "nvim_lsp"} 244 + {:name "buffer"} 245 + {:name "orgmode"}] 246 + :completion {:autocomplete false} 247 + :snippet {:expand (fn [args] 248 + ((. (require :luasnip) :lsp_expand) args.body))} 249 + :mapping {"<C-x><C-x>" (cmp.mapping.complete) 250 + "<C-y>" (cmp.mapping.confirm {:select true}) 251 + "<CR>" (cmp.mapping.confirm)}})) 251 252 252 253 (defcommand Bd "b#|bd#") 253 254 (defcommand BClean
+2 -1
vim/.config/nvim/ftdetect/custom.vim
··· 1 - au BufRead,BufNewFile *.config,*.config.script,*.app.src setf erlang 1 + au BufRead,BufNewFile *.fnl setf clojure 2 + au BufRead,BufNewFile rebar.config,rebar.config.script,*.app.src setf erlang 2 3 au BufRead,BufNewFile *.dhall setf dhall 3 4 au BufRead,BufNewFile PULLREQ_EDITMSG setf gitcommit
+2
vim/.config/nvim/init.lua
··· 1 + require('impatient').enable_profile() 2 + 1 3 -- Fennel loader, default one do not work well with NeoVim so there is custom 2 4 -- one 3 5 _G.fennel = require('fennel')
-12
vim/.config/nvim/lua/lspconfig/erlangls.lua
··· 1 - local configs = require 'lspconfig/configs' 2 - local util = require 'lspconfig/util' 3 - 4 - local server_name = 'erlangls' 5 - configs[server_name] = { 6 - default_config = { 7 - filetypes = {'erlang'}, 8 - root_dir = function(fname) 9 - return util.root_pattern('rebar.config', '.git')(fname) or vim.loop.os_homedir() 10 - end 11 - } 12 - }
+1
vim/.config/nvim/plugin/.gitignore
··· 1 + packer_compiled.lua
+11 -1
vim/.config/nvim/plugin/pastebin.vim
··· 3 3 endif 4 4 let g:loaded_pastebin = 1 5 5 6 - command! -range=% IX <line1>,<line2>w !curl -F 'f:1=<-' ix.io | pbcopy 6 + function s:pastebin(line1, line2) abort 7 + let l:filename = expand("%:p:t") 8 + let l:lines = getline(a:line1, a:line2) 9 + let l:url = trim(system("curl --netrc-optional -F 'f:1=@-;filename=\"".l:filename."\"' ix.io", l:lines)) 10 + 11 + let @+ = l:url 12 + 13 + echom "URL: ".l:url 14 + endfunction 15 + 16 + command! -range=% IX call <SID>pastebin(<line1>, <line2>)