fix(nvim): typos, neo-tree: follow current file

This commit is contained in:
js0ny 2025-11-11 01:00:48 +00:00
parent 0ce51ec458
commit 40f9eeed47
8 changed files with 105 additions and 92 deletions

View file

@ -66,21 +66,10 @@ opt.conceallevel = 2
-- opt.laststatus = 0 -- opt.laststatus = 0
-- 3: Global status line (always at the bottom) -- 3: Global status line (always at the bottom)
opt.laststatus = 3 opt.laststatus = 3
vim.go.laststatus = 3
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
-- hover.nvim -- hover.nvim
vim.o.mousemoveevent = true vim.o.mousemoveevent = true
-- Hide zero-width space
-- vim.api.nvim_create_autocmd("FileType", {
-- pattern = "*",
-- callback = function()
-- vim.opt_local.conceallevel = 2
-- vim.cmd([[
-- syntax match ZeroWidthSpace /\%u200b/ conceal
-- highlight link ZeroWidthSpace Conceal
-- ]])
-- end,
-- })
vim.fn.matchadd("Conceal", [[\%u200b]], 10, -1, { conceal = "" }) vim.fn.matchadd("Conceal", [[\%u200b]], 10, -1, { conceal = "" })

View file

@ -1,4 +1,8 @@
return { return {
-- Picker
{ import = "plugins.mod.fzf" },
-- Explorer
{ import = "plugins.mod.neo-tree" },
{ {
"rmagatti/auto-session", "rmagatti/auto-session",
event = "BufReadPre", event = "BufReadPre",
@ -12,9 +16,6 @@ return {
{ "<leader>ps", "<Cmd>AutoSession search<CR>", desc = "List all sessions" }, { "<leader>ps", "<Cmd>AutoSession search<CR>", desc = "List all sessions" },
}, },
}, },
-- { import = "plugins.mod.nvim-tree" },
-- { import = "plugins.mod.telescope" },
{ import = "plugins.mod.fzf" },
-- { -- {
-- "ahmedkhalf/project.nvim", -- "ahmedkhalf/project.nvim",
-- event = "VeryLazy", -- event = "VeryLazy",
@ -37,5 +38,4 @@ return {
"Neogit", "Neogit",
}, },
}, },
-- { import = "plugins.mod.neo-tree" },
} }

View file

@ -22,7 +22,7 @@ local config = {
-- theme = "catppuccin", -- theme = "catppuccin",
theme = "auto", theme = "auto",
-- IDE-like Global Status -- IDE-like Global Status
globalstaus = true, globalstaus = true, -- also set vim.go.laststatus = 3
}, },
sections = { sections = {
-- these are to remove the defaults -- these are to remove the defaults

View file

@ -12,18 +12,19 @@ return {
---@type neotree.Config? ---@type neotree.Config?
opts = { opts = {
window = { window = {
mappings = { mappings = {
["<space>"] = "noop", ["<space>"] = "noop", -- Pass it to leader
["e"] = "noop", ["e"] = "noop",
["<2-LeftMouse>"] = "open", ["<2-LeftMouse>"] = "open",
["<cr>"] = "open", ["<cr>"] = "open",
["i"] = "open", ["i"] = "open",
["<esc>"] = "cancel", -- close preview or floating neo-tree window ["<esc>"] = "cancel", -- close preview or floating neo-tree window
["P"] = { "toggle_preview", config = { use_float = true, use_image_nvim = true } }, ["P"] = { "toggle_preview", config = { use_float = true, use_snacks_image = true } },
-- Read `# Preview Mode` for more information -- Read `# Preview Mode` for more information
-- ["i"] = "focus_preview", -- ["i"] = "focus_preview",
["S"] = "open_split", ["S"] = "open_split",
["s"] = "open_vsplit", ["s"] = "open_vsplit",
["<C-h>"] = "open_vsplit",
-- ["S"] = "split_with_window_picker", -- ["S"] = "split_with_window_picker",
-- ["s"] = "vsplit_with_window_picker", -- ["s"] = "vsplit_with_window_picker",
["t"] = "open_tabnew", ["t"] = "open_tabnew",
@ -74,16 +75,21 @@ mappings = {
-- -- modified_format = function(seconds) return require('neo-tree.utils').relative_date(seconds) end -- -- modified_format = function(seconds) return require('neo-tree.utils').relative_date(seconds) end
-- -- } -- -- }
-- }, -- },
} },
} },
-- fill any relevant options here -- fill any relevant options here
filesystem = {
follow_current_file = {
enabled = true,
leave_dirs_open = true,
},
},
}, },
keys = { keys = {
{ {
"<leader>ft", "<leader>ft",
"<cmd>Neotree toggle<CR>", "<cmd>Neotree toggle<CR>",
desc = "Toggle File Explorer", desc = "Toggle File Explorer",
} },
} },
} }

View file

@ -88,13 +88,13 @@ return {
img_dirs = { "90 - System/Assets" }, img_dirs = { "90 - System/Assets" },
}, },
}, },
keys = { -- keys = {
{ -- {
"<leader>ft", -- "<leader>ft",
function() -- function()
require("snacks").explorer() -- require("snacks").explorer()
end, -- end,
desc = "Toggle File Explorer", -- desc = "Toggle File Explorer",
}, -- },
}, -- },
} }

View file

@ -19,6 +19,10 @@
# udev rules # udev rules
../../modules/nixos/hardware/udev/basys3.nix ../../modules/nixos/hardware/udev/basys3.nix
# Services
../../modules/nixos/desktop/wayvnc.nix
../../modules/nixos/core/sshd.nix
# desktop environment and display manager # desktop environment and display manager
../../modules/nixos/desktop/dm/sddm.nix ../../modules/nixos/desktop/dm/sddm.nix
../../modules/nixos/desktop/de/kde.nix ../../modules/nixos/desktop/de/kde.nix

View file

@ -0,0 +1,11 @@
{...}: {
services.openssh = {
enable = true;
settings = {
UseDns = true;
PermitRootLogin = "no";
# PasswordAuthentication = true;
# This is default to true, make sure override it when needed.
};
};
}

View file

@ -0,0 +1,3 @@
{...}: {
programs.wayvnc.enable = true;
}