Personal Nix setup
0
fork

Configure Feed

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

Switch from lir to oil

+71 -36
+20 -3
flake.lock
··· 497 497 "nvim-treesitter": "nvim-treesitter", 498 498 "nvim-treesitter-refactor": "nvim-treesitter-refactor", 499 499 "nvim-treesitter-textobjects": "nvim-treesitter-textobjects", 500 + "oil-nvim": "oil-nvim", 500 501 "plenary-nvim": "plenary-nvim", 501 502 "popup-nvim": "popup-nvim", 502 503 "telescope-nvim": "telescope-nvim", ··· 508 509 "which-key-nvim": "which-key-nvim" 509 510 }, 510 511 "locked": { 511 - "lastModified": 1725580431, 512 - "narHash": "sha256-G6jALJexW85L8lAl/tvsp9lFl60kjf+on7ri7F+0qYo=", 512 + "lastModified": 1725580703, 513 + "narHash": "sha256-nSgTVm3H7mjJvcldheROoP2Eg9KwHiUOo8zFKEyiXAQ=", 513 514 "owner": "kitten", 514 515 "repo": "system-nvim-plugins.nix", 515 - "rev": "e5efec8235b20cf92dc06301bf2fe34ef1eee3b5", 516 + "rev": "cdce266713971844cf5e25a1219f3e566a26e026", 516 517 "type": "github" 517 518 }, 518 519 "original": { ··· 566 567 "original": { 567 568 "owner": "nvim-treesitter", 568 569 "repo": "nvim-treesitter-textobjects", 570 + "type": "github" 571 + } 572 + }, 573 + "oil-nvim": { 574 + "flake": false, 575 + "locked": { 576 + "lastModified": 1725065409, 577 + "narHash": "sha256-vBQA+IhqakMmAVQrAZbvJkN9wLGqJ3m0EjoUi4uI9MA=", 578 + "owner": "stevearc", 579 + "repo": "oil.nvim", 580 + "rev": "1fe476daf0b3c108cb8ee1fc1226cc282fa2c9c1", 581 + "type": "github" 582 + }, 583 + "original": { 584 + "owner": "stevearc", 585 + "repo": "oil.nvim", 569 586 "type": "github" 570 587 } 571 588 },
+1 -1
modules/nvim/default.nix
··· 45 45 nvim-lspconfig 46 46 lspkind-nvim 47 47 vim-golden-size 48 - lir-nvim 49 48 popup-nvim 50 49 trouble-nvim 51 50 dressing-nvim 52 51 which-key-nvim 52 + oil-nvim 53 53 54 54 nvim-cmp 55 55 nvim-cmp-lsp
+50 -32
modules/nvim/init.lua
··· 230 230 -- fold controls 231 231 ["<bar>"] = { "<cmd>normal zc<cr>", "Close Fold" }, 232 232 ["<bslash>"] = { "<cmd>normal za<cr>", "Open Fold" }, 233 - -- lir 234 - ["-"] = { "<cmd>e %:p:h<cr>", "Open File Explorer" }, 235 - 233 + -- file explorer 234 + ["-"] = { require('oil').open, "Open File Explorer" }, 235 + -- highlights 236 236 ["<C-e>"] = { function() print(vim.inspect(vim.treesitter.get_captures_at_cursor(0))) end, "Output TS capture" }, 237 - ["<C-S-e>"] = { 238 - function() vim.cmd [[ 239 - echo synIDattr(synID(line('.'), col('.'), 1), 'name') . ' -> ' . synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name') 240 - ]] end, 241 - "Output Hi capture" 242 - }, 243 237 }) 244 238 245 239 -- golden_size ··· 585 579 preset = 'codicons', 586 580 } 587 581 588 - -- lir settings 589 - local lir_actions = require('lir.actions') 590 - require('lir').setup { 591 - show_hidden_files = false, 592 - ignore = { ".DS_Store" }, 593 - devicons_enable = false, 594 - hide_cursor = true, 595 - mappings = { 596 - ['l'] = lir_actions.edit, 597 - ['<cr>'] = lir_actions.edit, 598 - ['h'] = lir_actions.up, 599 - ['-'] = lir_actions.up, 600 - ['<esc>'] = lir_actions.quit, 601 - ['<c-c>'] = lir_actions.quit, 602 - ['@'] = lir_actions.cd, 603 - ['.'] = lir_actions.toggle_show_hidden, 582 + require("oil").setup({ 583 + default_file_explorer = true, 584 + delete_to_trash = false, 585 + skip_confirm_for_simple_edits = true, 586 + prompt_save_on_select_new_entry = true, 587 + cleanup_delay_ms = 2000, 588 + lsp_file_methods = { 589 + timeout_ms = 1000, 590 + autosave_changes = false, 604 591 }, 605 - on_init = function() 606 - -- hide statusline for lir 607 - vim.api.nvim_exec([[ 608 - let &l:statusline='%{getline(line("w$")+1)}' 609 - ]], false) 610 - end, 611 - } 592 + constrain_cursor = 'editable', 593 + watch_for_changes = false, 594 + use_default_keymaps = true, 595 + view_options = { 596 + show_hidden = false, 597 + is_hidden_file = function(name, bufnr) 598 + return vim.startswith(name, '.') 599 + end, 600 + is_always_hidden = function(name, bufnr) 601 + return name == '.DS_Store' 602 + end, 603 + natural_order = true, 604 + case_insensitive = true, 605 + sort = { 606 + { 'type', 'asc' }, 607 + { 'name', 'asc' }, 608 + }, 609 + }, 610 + float = { 611 + preview_split = 'auto', 612 + border = 'none', 613 + win_options = { 614 + winblend = 5, 615 + }, 616 + }, 617 + preview = { 618 + border = 'none', 619 + win_options = { winblend = 5 }, 620 + update_on_cursor_moved = true, 621 + }, 622 + progress = { 623 + border = 'none', 624 + minimized_border = 'none', 625 + win_options = { winblend = 5 }, 626 + }, 627 + ssh = { border = 'none', }, 628 + keymaps_help = { border = 'none' }, 629 + }) 612 630 613 631 -- hide sticky commands 614 632 vim.api.nvim_create_autocmd({ 'CursorHold' }, {