diff --git a/flake.lock b/flake.lock index 5fc518d..40b7cc2 100644 --- a/flake.lock +++ b/flake.lock @@ -137,11 +137,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1696343447, - "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", + "lastModified": 1698579227, + "narHash": "sha256-KVWjFZky+gRuWennKsbo6cWyo7c/z/VgCte5pR9pEKg=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", + "rev": "f76e870d64779109e41370848074ac4eaa1606ec", "type": "github" }, "original": { @@ -244,11 +244,11 @@ ] }, "locked": { - "lastModified": 1698479159, - "narHash": "sha256-rJHBDwW4LbADEfhkgGHjKGfL2dF44NrlyXdXeZrQahs=", + "lastModified": 1698670511, + "narHash": "sha256-jQIu3UhBMPHXzVkHQO1O2gg8SVo5lqAVoC6mOaLQcLQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "f92a54fef4eacdbe86b0a2054054dd58b0e2a2a4", + "rev": "8e5416b478e465985eec274bc3a018024435c106", "type": "github" }, "original": { @@ -287,11 +287,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1698482818, - "narHash": "sha256-BYsQ93zRMvsXQZfk1JLuLSv3EsKQ6rk/nmROFhxUNGk=", + "lastModified": 1698765225, + "narHash": "sha256-K30xCGRbmKYj+NY7O0lvsPGctVp6shfQs61BAVq0Plc=", "owner": "neovim", "repo": "neovim", - "rev": "7a5effb0f95e295c265fe09e7414d859a6d79657", + "rev": "746a153bc1a1bc1433a1246fcf454eeb058b9de1", "type": "github" }, "original": { @@ -312,11 +312,11 @@ ] }, "locked": { - "lastModified": 1698491143, - "narHash": "sha256-9jisCrRFBqH7EGT8uwkANYJYdwrB0fykX+RPRJN+va0=", + "lastModified": 1698783027, + "narHash": "sha256-rd7mReWQkidngiuKvJhIjU85FjQr/54Fxixd/p+P2IA=", "ref": "refs/heads/master", - "rev": "0ecdc408f85b68dd9cf46540924c607bb3c180c3", - "revCount": 552, + "rev": "95445dabbc24d561e62d54f15d088ff08fbd72ab", + "revCount": 555, "type": "git", "url": "https://git.kempkens.io/daniel/nix-overlay" }, @@ -363,11 +363,11 @@ }, "nixos-unstable": { "locked": { - "lastModified": 1698443389, - "narHash": "sha256-/IhqtAuFPL1gew2h1+b+xQipv2WVt9EuszSHz5a4PNI=", + "lastModified": 1698653593, + "narHash": "sha256-4SW5hJ7ktIO6j1+aNah0c9u+XDxjR4uYwPVtkVZynrs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a9d001fd4af2df7f5702bbdb28a0081c855cb625", + "rev": "423b31f1b24ec8d82baec9a5bb969da892010e6d", "type": "github" }, "original": { @@ -379,11 +379,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1698336494, - "narHash": "sha256-sO72WDBKyijYD1GcKPlGsycKbMBiTJMBCnmOxLAs880=", + "lastModified": 1698553279, + "narHash": "sha256-T/9P8yBSLcqo/v+FTOBK+0rjzjPMctVymZydbvR/Fak=", "owner": "nixos", "repo": "nixpkgs", - "rev": "808c0d8c53c7ae50f82aca8e7df263225cf235bf", + "rev": "90e85bc7c1a6fc0760a94ace129d3a1c61c3d035", "type": "github" }, "original": { diff --git a/home/config/direnv/direnvrc b/home/config/direnv/direnvrc index 5b6fe3e..d97e4a2 100644 --- a/home/config/direnv/direnvrc +++ b/home/config/direnv/direnvrc @@ -75,6 +75,11 @@ project_rust() { # Frameworks +project_phoenix() { + project_elixir + project_node +} + project_rails() { project_ruby project_node diff --git a/home/config/nvim/nifoc/keymap.fnl b/home/config/nvim/nifoc/keymap.fnl index ba633b7..aafbc3e 100644 --- a/home/config/nvim/nifoc/keymap.fnl +++ b/home/config/nvim/nifoc/keymap.fnl @@ -6,17 +6,10 @@ telescope-nifoc (require :nifoc.telescope) telescope-ivy (telescope-themes.get_ivy) telescope-dropdown (telescope-themes.get_dropdown) + npairs (require :nvim-autopairs) gitsigns (require :gitsigns) repl (require :nifoc.repl) formatting (require :nifoc.formatting)] - (set _G.mini_cr_action - (fn [] - (if (not= (vim.fn.pumvisible) 0) - (if (not= (. (vim.fn.complete_info) :selected) -1) - (vim.api.nvim_replace_termcodes : true true true) - (vim.api.nvim_replace_termcodes : true true true)) - ((. (require :mini.pairs) :cr))))) - (fn mod.setup [] (keymap.set :n : : {:noremap true}) ;; Leader Mappings @@ -56,6 +49,7 @@ (keymap.set :n :dtp :TSPlaygroundToggle {:desc "Toggle Treetsitter Playground"}) ;; Other Mappings + (keymap.set :i : npairs.autopairs_cr {:expr true :silent true}) (keymap.set :n :F #(formatting.maybe-format-buffer 0) {:desc "Format Buffer"}) (keymap.set :n : :b) @@ -75,15 +69,7 @@ (keymap.set :x :gp "(YankyGPutAfter)") (keymap.set :x :gP "(YankyGPutBefore)") (keymap.set :n :y "(YankyYank)") - (keymap.set :x :y "(YankyYank)") - ;; Completion - (keymap.set :i : "pumvisible() ? \"\\\" : \"\\\"" - {:expr true}) - (keymap.set :i : "pumvisible() ? \"\\\" : \"\\\"" - {:expr true}) - (keymap.set :i : "v:lua._G.mini_cr_action()" {:expr true}) - (keymap.set :i : "pumvisible() ? \"\\\" : \"\\\"" - {:expr true})) + (keymap.set :x :y "(YankyYank)")) (fn mod.lsp-attach [_client bufnr] (keymap.set :n :t diff --git a/home/config/nvim/plugins/autopairs.fnl b/home/config/nvim/plugins/autopairs.fnl new file mode 100644 index 0000000..3338c38 --- /dev/null +++ b/home/config/nvim/plugins/autopairs.fnl @@ -0,0 +1,5 @@ +(let [npairs (require :nvim-autopairs)] + (npairs.setup {:check_ts true + :ts_config {:javascript [:string :template_string] + :elixir [:string] + :lua [:string :source]}})) diff --git a/home/config/nvim/plugins/cmp.fnl b/home/config/nvim/plugins/cmp.fnl new file mode 100644 index 0000000..e67d067 --- /dev/null +++ b/home/config/nvim/plugins/cmp.fnl @@ -0,0 +1,69 @@ +(let [cmp (require :cmp) + luasnip (require :luasnip) + lspkind (require :lspkind) + npairs (require :nvim-autopairs.completion.cmp)] + (fn has-words-before? [] + (let [(line col) (-> 0 (vim.api.nvim_win_get_cursor) (unpack))] + (if (not= col 0) + (let [line-content (vim.api.nvim_buf_get_lines 0 (- line 1) line true) + cursor-content (: (. line-content 1) :sub col col)] + (= (cursor-content:match "%s") nil)) + false))) + + (fn map-tab [fallback] + (if (cmp.visible) (cmp.select_next_item) + (luasnip.expand_or_jumpable) (luasnip.expand_or_jump) + (has-words-before?) (cmp.complete) + (fallback))) + + (fn map-stab [fallback] + (if (cmp.visible) (cmp.select_prev_item) + (luasnip.jumpable -1) (luasnip.jump -1) + (fallback))) + + (cmp.setup {:sources (cmp.config.sources [{:name :nvim_lsp} + ;{:name :nvim_lsp_signature_help} + {:name :luasnip} + {:name :treesitter + :keyword_length 3} + {:name :buffer :keyword_length 3} + {:name :path}]) + :mapping (cmp.mapping.preset.insert {: (cmp.mapping {:i (cmp.mapping.abort) + :c (cmp.mapping.close)}) + : (cmp.mapping {:i (cmp.mapping.abort)}) + : (cmp.mapping {:c #(if (cmp.visible) + (cmp.select_next_item {:behavior cmp.SelectBehavior.Insert}) + (cmp.complete)) + :i map-tab + :s map-tab}) + : (cmp.mapping {:c #(if (cmp.visible) + (cmp.select_prev_item {:behavior cmp.SelectBehavior.Insert}) + (cmp.complete)) + :i map-stab + :s map-stab}) + : (cmp.mapping.confirm {:behavior cmp.ConfirmBehavior.Insert + :select true}) + : (cmp.mapping.confirm {:select true})}) + :window {:documentation (cmp.config.window.bordered)} + :completion {:keyword_length 2 + :completeopt "menu,menuone,noinsert"} + :snippet {:expand (fn [args] + (luasnip.lsp_expand args.body))} + :formatting {:format (lspkind.cmp_format {:mode :symbol_text + :menu {:buffer "[Buffer]" + :cmdline "[Cmd]" + :luasnip "[LuaSnip]" + :nvim_lsp "[LSP]" + :nvim_lsp_document_symbol "[Symbol]" + :nvim_lua "[Lua]" + :path "[Path]"}})} + :experimental {:ghost_text true}}) + (cmp.setup.cmdline "/" + {:sources (cmp.config.sources [{:name :nvim_lsp_document_symbol}] + [{:name :buffer}]) + :mapping (cmp.mapping.preset.cmdline)}) + (cmp.setup.cmdline ":" + {:sources (cmp.config.sources [{:name :path}] + [{:name :cmdline}]) + :mapping (cmp.mapping.preset.cmdline)}) + (cmp.event:on :confirm_done (npairs.on_confirm_done))) diff --git a/home/config/nvim/plugins/comment.fnl b/home/config/nvim/plugins/comment.fnl new file mode 100644 index 0000000..a535b61 --- /dev/null +++ b/home/config/nvim/plugins/comment.fnl @@ -0,0 +1,2 @@ +(let [cmt (require :Comment)] + (cmt.setup {:padding true})) diff --git a/home/config/nvim/plugins/lsp.fnl b/home/config/nvim/plugins/lsp.fnl index ea95124..b9f8804 100644 --- a/home/config/nvim/plugins/lsp.fnl +++ b/home/config/nvim/plugins/lsp.fnl @@ -1,5 +1,6 @@ (let [lsp (require :lspconfig) lsp-configs (require :lspconfig.configs) + cmp (require :cmp_nvim_lsp) navic (require :nvim-navic) diagnostic (require :nifoc.diagnostic) augroup (vim.api.nvim_create_augroup :NifocLsp {:clear true}) @@ -21,20 +22,14 @@ (when (client.supports_method :textDocument/inlayHint) (vim.lsp.inlay_hint bufnr true) (setup-inlay-hint-toggle bufnr)) - (when (client.supports_method :textDocument/completion) - (set vim.opt_local.omnifunc - "v:lua.MiniCompletion.completefunc_lsp")) (diagnostic.maybe-enable-lsp client bufnr))) :group augroup :desc "Automatic LSP setup"}) ;; Servers (vim.lsp.set_log_level :OFF) - (let [handlers {:textDocument/hover (vim.lsp.with vim.lsp.handlers.hover - {:border :rounded}) - :textDocument/signatureHelp (vim.lsp.with vim.lsp.handlers.signature_help - {:border :rounded})} + (let [capabilities (cmp.default_capabilities) flags {:allow_incremental_sync true :debounce_text_changes 700} - default-config {: handlers : flags} + default-config {: capabilities : flags} default-servers [:bashls :cssls :dockerls diff --git a/home/config/nvim/plugins/luasnip.fnl b/home/config/nvim/plugins/luasnip.fnl new file mode 100644 index 0000000..6efbbb5 --- /dev/null +++ b/home/config/nvim/plugins/luasnip.fnl @@ -0,0 +1,5 @@ +(let [luasnip (require :luasnip) + luasnip-vscode (require :luasnip.loaders.from_vscode)] + (luasnip.config.setup {:region_check_events "CursorHold,InsertEnter,InsertLeave" + :delete_check_events "TextChanged,InsertEnter"}) + (luasnip-vscode.lazy_load)) diff --git a/home/config/nvim/plugins/mini.fnl b/home/config/nvim/plugins/mini.fnl index ed4894e..8ad9d6a 100644 --- a/home/config/nvim/plugins/mini.fnl +++ b/home/config/nvim/plugins/mini.fnl @@ -1,10 +1,5 @@ (let [miniclue (require :mini.clue) - hipatterns (require :mini.hipatterns) - b vim.b - api vim.api - ctrl_n (api.nvim_replace_termcodes : true false true) - augroup (vim.api.nvim_create_augroup :NifocMini {:clear true}) - aucmd vim.api.nvim_create_autocmd] + hipatterns (require :mini.hipatterns)] ;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-ai.md ((. (require :mini.ai) :setup) {}) ;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-clue.md @@ -14,30 +9,6 @@ ; Built-in {:mode :i :keys :}] :clues [(miniclue.gen_clues.builtin_completion)]}) - ;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-comment.md - ((. (require :mini.comment) :setup) {}) - ;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-completion.md - (set b.nifoc_completion_fallback_count 0) - - (fn completion-fallback [] - (let [count b.nifoc_completion_fallback_count] - (when (< count 3) - (api.nvim_feedkeys ctrl_n :n false) - (set b.nifoc_completion_fallback_count (+ count 1))))) - - ((. (require :mini.completion) :setup) {:window {:info {:height 25 - :width 80 - :border :rounded} - :signature {:height 25 - :width 80 - :border :rounded}} - :lsp_completion {:source_func :omnifunc - :auto_setup false} - :fallback_action completion-fallback}) - (aucmd [:InsertLeave :CursorHoldI] - {:callback #(set b.nifoc_completion_fallback_count 0) - :group augroup - :desc "Re-enable completion fallback on cursor-hold"}) ;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-hipatterns.md (hipatterns.setup {:highlighters {:fixme {:pattern "%f[%w]()FIXME()%f[%W]" :group :MiniHipatternsFixme} @@ -55,8 +26,4 @@ ((. (require :mini.move) :setup) {:mappings {:down : :up : :line_down : - :line_up :}}) - ;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-surround.md - ((. (require :mini.surround) :setup) {}) - ;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-pairs.md - ((. (require :mini.pairs) :setup) {})) + :line_up :}})) diff --git a/home/config/nvim/plugins/surround.fnl b/home/config/nvim/plugins/surround.fnl new file mode 100644 index 0000000..9822610 --- /dev/null +++ b/home/config/nvim/plugins/surround.fnl @@ -0,0 +1,2 @@ +(let [surround (require :nvim-surround)] + (surround.setup {})) diff --git a/home/config/nvim/plugins/treesitter.fnl b/home/config/nvim/plugins/treesitter.fnl index 13ec892..9e18fae 100644 --- a/home/config/nvim/plugins/treesitter.fnl +++ b/home/config/nvim/plugins/treesitter.fnl @@ -14,6 +14,7 @@ :ac "@conditional.outer" :ic "@conditional.inner"}}} :matchup {:enable true :disable disable-parsers} + :autopairs {:enable true :disable disable-parsers} :playground {:enable true} :nifoc_hooks {:enable true :disable disable-parsers}})) diff --git a/home/programs/nvim/default.nix b/home/programs/nvim/default.nix index 301dd8f..1b4968b 100644 --- a/home/programs/nvim/default.nix +++ b/home/programs/nvim/default.nix @@ -193,6 +193,8 @@ in nvim-jdtls + lspkind-nvim + { plugin = nvim-navic; config = builtins.readFile ../../config/nvim/plugins/navic.fnl; @@ -212,6 +214,36 @@ in type = "fennel"; } + # Comments + { + plugin = comment-nvim; + config = builtins.readFile ../../config/nvim/plugins/comment.fnl; + type = "fennel"; + } + + # Snippets + { + plugin = LuaSnip; + config = builtins.readFile ../../config/nvim/plugins/luasnip.fnl; + type = "fennel"; + } + + friendly-snippets + + # cmp + { + plugin = nvim-cmp; + config = builtins.readFile ../../config/nvim/plugins/cmp.fnl; + type = "fennel"; + } + + cmp-nvim-lsp + cmp_luasnip + cmp-path + cmp-buffer + cmp-cmdline + cmp-nvim-lsp-document-symbol + # Formatting { @@ -221,12 +253,25 @@ in } # Pairs + { + plugin = nvim-autopairs; + config = builtins.readFile ../../config/nvim/plugins/autopairs.fnl; + type = "fennel"; + } + { plugin = vim-matchup; config = builtins.readFile ../../config/nvim/plugins/matchup.fnl; type = "fennel"; } + # Textobjects + { + plugin = nvim-surround; + config = builtins.readFile ../../config/nvim/plugins/surround.fnl; + type = "fennel"; + } + # UI { plugin = heirline-nvim; diff --git a/home/programs/nvim/plugins.nix b/home/programs/nvim/plugins.nix index b85a0a4..8560dc2 100644 --- a/home/programs/nvim/plugins.nix +++ b/home/programs/nvim/plugins.nix @@ -29,12 +29,12 @@ in }; mini-nvim = buildVimPlugin { pname = "mini.nvim"; - version = "2023-10-26"; + version = "2023-10-29"; src = fetchFromGitHub { owner = "echasnovski"; repo = "mini.nvim"; - rev = "f699158e6a654d2778e446d98de2881d7ab1f5fb"; - sha256 = "1lxpfps98y6jy93bx0a4jrwnqv97cmv7yxhabr9z9xwazp004d4k"; + rev = "9b379d3bb8aac34015f27acd0e981d67e334ab12"; + sha256 = "0ldvs3dks1graa9mf9wljd8frd5x9lnxj6mprh9ikfwxi9aabyvd"; fetchSubmodules = false; }; }; @@ -117,12 +117,12 @@ in }; nvim-treesitter = buildVimPlugin { pname = "nvim-treesitter"; - version = "2023-10-27"; + version = "2023-10-31"; src = fetchFromGitHub { owner = "nvim-treesitter"; repo = "nvim-treesitter"; - rev = "bf0a96568a54618138ac42c84758945cdafef86b"; - sha256 = "1d05141a8bj4bdklwsss89nlrx3xfcjw5a5nyzcgmhfinr0jpznv"; + rev = "efec7115d8175bdb6720eeb4e26196032cb52593"; + sha256 = "0zby6aa40ivr294hdbxyzh5pgb5jayv5infsqay1mxqpvp1pywca"; fetchSubmodules = false; }; }; @@ -139,12 +139,12 @@ in }; rainbow-delimiters-nvim = buildVimPlugin { pname = "rainbow-delimiters.nvim"; - version = "2023-10-22"; + version = "2023-10-29"; src = fetchFromGitHub { owner = "HiPhish"; repo = "rainbow-delimiters.nvim"; - rev = "9fda1322e704acfbb5a9691e2c4303368d591367"; - sha256 = "1crd6ybikdk768xsm769xvzia8wkg0hx9bh9h3nyak0gj779zdc4"; + rev = "df8cdf68234fbf056202a9684931c3dfa89988c1"; + sha256 = "03hmkdkny3rfhprjimxala058b31das66iqzkghm99jw7mbrd4xc"; fetchSubmodules = false; }; }; @@ -219,12 +219,12 @@ in }; nvim-lspconfig = buildVimPlugin { pname = "nvim-lspconfig"; - version = "2023-10-26"; + version = "2023-10-29"; src = fetchFromGitHub { owner = "neovim"; repo = "nvim-lspconfig"; - rev = "cb49a4cd622d7ed775c31561bb8aa6a50712d6b9"; - sha256 = "1zxd67r3qq5ryvy31jgy1clkcgm5ld4sjybz1p6fcp4iwhcfrjky"; + rev = "d0467b9574b48429debf83f8248d8cee79562586"; + sha256 = "0iln2vhg9v11nwn0ry2xkyds2894d5bs2giqhf0lqif56rs3yapj"; fetchSubmodules = false; }; }; @@ -239,6 +239,17 @@ in fetchSubmodules = false; }; }; + lspkind-nvim = buildVimPlugin { + pname = "lspkind.nvim"; + version = "2023-05-05"; + src = fetchFromGitHub { + owner = "onsails"; + repo = "lspkind.nvim"; + rev = "57610d5ab560c073c465d6faf0c19f200cb67e6e"; + sha256 = "18lpp3ng52ylp8s79qc84b4dhmy7ymgis7rjp88zghv1kndrksjb"; + fetchSubmodules = false; + }; + }; nvim-navic = buildVimPlugin { pname = "nvim-navic"; version = "2023-09-18"; @@ -272,14 +283,135 @@ in fetchSubmodules = false; }; }; + comment-nvim = buildVimPlugin { + pname = "comment.nvim"; + version = "2023-08-07"; + src = fetchFromGitHub { + owner = "numtostr"; + repo = "comment.nvim"; + rev = "0236521ea582747b58869cb72f70ccfa967d2e89"; + sha256 = "1mvi7c6n9ybgs6lfylzhkidifa6jkgsbj808knx57blvi5k7blgr"; + fetchSubmodules = false; + }; + }; + LuaSnip = buildVimPlugin { + pname = "LuaSnip"; + version = "2023-10-18"; + src = fetchFromGitHub { + owner = "L3MON4D3"; + repo = "LuaSnip"; + rev = "80a8528f084a97b624ae443a6f50ff8074ba486b"; + sha256 = "16daainc44r8ijypp2ksm53sscjil603xw73ry7nd5x54iar06f9"; + fetchSubmodules = false; + }; + }; + friendly-snippets = buildVimPlugin { + pname = "friendly-snippets"; + version = "2023-10-01"; + src = fetchFromGitHub { + owner = "rafamadriz"; + repo = "friendly-snippets"; + rev = "43727c2ff84240e55d4069ec3e6158d74cb534b6"; + sha256 = "1sjk17gn919aa84dkjfagwwjsas9zfkbrk840bjf580k8m83d9m8"; + fetchSubmodules = false; + }; + }; + nvim-cmp = buildVimPlugin { + pname = "nvim-cmp"; + version = "2023-10-25"; + src = fetchFromGitHub { + owner = "hrsh7th"; + repo = "nvim-cmp"; + rev = "51260c02a8ffded8e16162dcf41a23ec90cfba62"; + sha256 = "0h5n8ks34vxr2b17vddrv4vgjyr649bl7i839awpad21x146krkz"; + fetchSubmodules = false; + }; + }; + cmp-nvim-lsp = buildVimPlugin { + pname = "cmp-nvim-lsp"; + version = "2023-06-23"; + src = fetchFromGitHub { + owner = "hrsh7th"; + repo = "cmp-nvim-lsp"; + rev = "44b16d11215dce86f253ce0c30949813c0a90765"; + sha256 = "1ny64ls3z9pcflsg3sd7xnd795mcfbqhyan3bk4ymxgv5jh2qkcr"; + fetchSubmodules = false; + }; + }; + cmp_luasnip = buildVimPlugin { + pname = "cmp_luasnip"; + version = "2023-10-09"; + src = fetchFromGitHub { + owner = "saadparwaiz1"; + repo = "cmp_luasnip"; + rev = "05a9ab28b53f71d1aece421ef32fee2cb857a843"; + sha256 = "0gw3jz65dnxkc618j26zj37gs1yycf7wql9yqc9glazjdjbljhlx"; + fetchSubmodules = false; + }; + }; + cmp-path = buildVimPlugin { + pname = "cmp-path"; + version = "2022-10-03"; + src = fetchFromGitHub { + owner = "hrsh7th"; + repo = "cmp-path"; + rev = "91ff86cd9c29299a64f968ebb45846c485725f23"; + sha256 = "18ixx14ibc7qrv32nj0ylxrx8w4ggg49l5vhcqd35hkp4n56j6mn"; + fetchSubmodules = false; + }; + }; + cmp-buffer = buildVimPlugin { + pname = "cmp-buffer"; + version = "2022-08-10"; + src = fetchFromGitHub { + owner = "hrsh7th"; + repo = "cmp-buffer"; + rev = "3022dbc9166796b644a841a02de8dd1cc1d311fa"; + sha256 = "1cwx8ky74633y0bmqmvq1lqzmphadnhzmhzkddl3hpb7rgn18vkl"; + fetchSubmodules = false; + }; + }; + cmp-cmdline = buildVimPlugin { + pname = "cmp-cmdline"; + version = "2023-06-08"; + src = fetchFromGitHub { + owner = "hrsh7th"; + repo = "cmp-cmdline"; + rev = "8ee981b4a91f536f52add291594e89fb6645e451"; + sha256 = "03j79ncxnnpilx17x70my7s8vvc4w81kipraq29g4vp32dggzjsv"; + fetchSubmodules = false; + }; + }; + cmp-nvim-lsp-document-symbol = buildVimPlugin { + pname = "cmp-nvim-lsp-document-symbol"; + version = "2023-04-01"; + src = fetchFromGitHub { + owner = "hrsh7th"; + repo = "cmp-nvim-lsp-document-symbol"; + rev = "f0f53f704c08ea501f9d222b23491b0d354644b0"; + sha256 = "1zcplbb2kkq3f9mmy6zfgscdiccqiwkjr4d91qqjxp80yi1v9z4j"; + fetchSubmodules = false; + }; + }; conform-nvim = buildVimPlugin { pname = "conform.nvim"; - version = "2023-10-27"; + version = "2023-10-31"; src = fetchFromGitHub { owner = "stevearc"; repo = "conform.nvim"; - rev = "253878436e2b6d73dfd91ccf0ac12d04cc683d34"; - sha256 = "1pn9sf3y2584cnazfxrxzvls8g9812p24bb83zxlpvs9q3psccjz"; + rev = "2c1e852fbf723b7d89b14fd28089472d92edeeb9"; + sha256 = "1d899gl06zsyygssbzbdmd6aymv8n7ralvlws3gv80yhqyx1s494"; + fetchSubmodules = false; + }; + }; + nvim-autopairs = buildVimPlugin { + pname = "nvim-autopairs"; + version = "2023-10-21"; + src = fetchFromGitHub { + owner = "windwp"; + repo = "nvim-autopairs"; + rev = "0f04d78619cce9a5af4f355968040f7d675854a1"; + sha256 = "0k2pibxx42qsdvxgbrdj7g44y5q6dnaw0g07gq025dpn27jk9ark"; fetchSubmodules = false; }; }; @@ -294,6 +426,17 @@ in fetchSubmodules = false; }; }; + nvim-surround = buildVimPlugin { + pname = "nvim-surround"; + version = "2023-10-23"; + src = fetchFromGitHub { + owner = "kylechui"; + repo = "nvim-surround"; + rev = "4f0e1f470595af067eca9b872778d83c7f52f134"; + sha256 = "16q85dd79rdn1v7wqshzhjgrsgbnzk04l4vjgp6g9hbj8p8sna4k"; + fetchSubmodules = false; + }; + }; heirline-nvim = buildVimPlugin { pname = "heirline.nvim"; version = "2023-09-03"; @@ -307,12 +450,12 @@ in }; indent-blankline-nvim = buildVimPlugin { pname = "indent-blankline.nvim"; - version = "2023-10-28"; + version = "2023-10-30"; src = fetchFromGitHub { owner = "lukas-reineke"; repo = "indent-blankline.nvim"; - rev = "64fdadb3ada61c4297452f7662789b01ee82ffcb"; - sha256 = "0dwv91x63c47r0xyxcwc7vlc9b9b2baqad2xgm6r865gmx1fh31b"; + rev = "29be0919b91fb59eca9e90690d76014233392bef"; + sha256 = "0z8n9d6f4qiq8m4ai1r2xz90955cp6cikqprq74ivfch3icrzdi1"; fetchSubmodules = false; }; }; @@ -329,12 +472,12 @@ in }; urlview-nvim = buildVimPlugin { pname = "urlview.nvim"; - version = "2023-09-19"; + version = "2023-10-29"; src = fetchFromGitHub { owner = "axieax"; repo = "urlview.nvim"; - rev = "bdbdf1e020e283551f003e71b0004096c746ef57"; - sha256 = "1bf226s400vyjffr6zqx9kr52qznzcgx1jnh356vfx3fjxsq81nl"; + rev = "7d622e11adbc2cac5bba62345ade9b6672d564a4"; + sha256 = "1cqzvbglqjy4563p4q08lsy3yhbsvn8i2davjlgplxvnvb76i68d"; fetchSubmodules = false; }; }; diff --git a/home/programs/nvim/plugins.yaml b/home/programs/nvim/plugins.yaml index fc4bac4..fadad67 100644 --- a/home/programs/nvim/plugins.yaml +++ b/home/programs/nvim/plugins.yaml @@ -27,14 +27,31 @@ # LSP - src: neovim/nvim-lspconfig - src: mfussenegger/nvim-jdtls +- src: onsails/lspkind.nvim - src: SmiteshP/nvim-navic - src: RRethy/vim-illuminate # Linter - src: mfussenegger/nvim-lint +# Comments +- src: numtostr/comment.nvim +# Snippets +- src: L3MON4D3/LuaSnip +- src: rafamadriz/friendly-snippets +# cmp +- src: hrsh7th/nvim-cmp +- src: hrsh7th/cmp-nvim-lsp +- src: saadparwaiz1/cmp_luasnip +- src: hrsh7th/cmp-path +- src: hrsh7th/cmp-buffer +- src: hrsh7th/cmp-cmdline +- src: hrsh7th/cmp-nvim-lsp-document-symbol # Formatting - src: stevearc/conform.nvim # Pairs +- src: windwp/nvim-autopairs - src: andymass/vim-matchup +# Textobjects +- src: kylechui/nvim-surround # UI - src: rebelot/heirline.nvim - src: lukas-reineke/indent-blankline.nvim diff --git a/secret/container/additional-media/default.nix b/secret/container/additional-media/default.nix index 3f8773c..08957f2 100644 Binary files a/secret/container/additional-media/default.nix and b/secret/container/additional-media/default.nix differ diff --git a/system/nixos/forgejo.nix b/system/nixos/forgejo.nix index ecdfd57..12b7f3d 100644 --- a/system/nixos/forgejo.nix +++ b/system/nixos/forgejo.nix @@ -63,6 +63,8 @@ in useACMEHost = "kempkens.io"; extraConfig = '' + client_max_body_size 0; + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; ''; diff --git a/system/nixos/wireguard-firewall-mediaserver.nix b/system/nixos/wireguard-firewall-mediaserver.nix index b3acfcf..e239d44 100644 --- a/system/nixos/wireguard-firewall-mediaserver.nix +++ b/system/nixos/wireguard-firewall-mediaserver.nix @@ -47,6 +47,7 @@ let # Ports ip46tables -A wg-fw -p tcp --dport 3000 -j wg-fw-accept -i vethwgns0 + ip46tables -A wg-fw -p tcp --dport 4000 -j wg-fw-accept -i vethwgns0 ip46tables -A wg-fw -p tcp --dport 6801 -j wg-fw-accept -i vethwgns0 ip46tables -A wg-fw -p tcp --dport 7441 -j wg-fw-accept -i vethwgns0 ip46tables -A wg-fw -p tcp --dport 7474 -j wg-fw-accept -i vethwgns0