diff options
| -rw-r--r-- | nvim/.config/nvim/lazy-lock.json | 1 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/config/keymaps.lua | 44 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/config/lazy.lua | 7 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/config/options.lua | 1 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/competitest.lua | 1 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/lualine-macro-recording.lua | 1 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/main.lua | 9 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/obsidian.lua | 5 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/telescope.lua | 16 | ||||
| -rw-r--r-- | nvim/.config/nvim/lua/plugins/undotree.lua | 12 | ||||
| -rw-r--r-- | nvim/.config/nvim/spell/en.utf-8.add | 1 | ||||
| -rw-r--r-- | nvim/.config/nvim/spell/en.utf-8.add.spl | bin | 0 -> 46 bytes |
12 files changed, 72 insertions, 26 deletions
diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 2d98779..9606910 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -74,6 +74,7 @@ "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, "ts-comments.nvim": { "branch": "main", "commit": "1bd9d0ba1d8b336c3db50692ffd0955fe1bb9f0c" }, "typescript.nvim": { "branch": "main", "commit": "4de85ef699d7e6010528dcfbddc2ed4c2c421467" }, + "undotree": { "branch": "master", "commit": "28f2f54a34baff90ea6f4a735ef1813ad875c743" }, "vim-tmux-navigator": { "branch": "master", "commit": "412c474e97468e7934b9c217064025ea7a69e05e" }, "vimtex": { "branch": "master", "commit": "7f2633027c8f496a85284de0c11aa32f1e07e049" } } diff --git a/nvim/.config/nvim/lua/config/keymaps.lua b/nvim/.config/nvim/lua/config/keymaps.lua index 2bb7600..e5aa308 100644 --- a/nvim/.config/nvim/lua/config/keymaps.lua +++ b/nvim/.config/nvim/lua/config/keymaps.lua @@ -72,6 +72,29 @@ vim.cmd([[ cnoreabbrev Qall qall ]]) +-- load the session for the current directory +vim.keymap.set("n", "<leader>ql", function() + require("persistence").load() +end) + +-- select a session to load +vim.keymap.set("n", "<leader>qs", function() + require("persistence").select() +end) + +-- load the last session +vim.keymap.set("n", "<leader>qL", function() + require("persistence").load({ last = true }) +end) + +-- stop Persistence => session won't be saved on exit +vim.keymap.set("n", "<leader>qd", function() + require("persistence").stop() +end) + +-- Sane keymap to deal with built-in terminal +map("t", "<Esc>", "<C-\\><C-n>", { desc = "Using Escape in terminal mode to actualy put you back in normal mode" }) + -- vimtex keymaps map("n", "<leader>i", "<Cmd>VimtexCompile<CR>", { desc = "Compile latex document", remap = true }) @@ -84,28 +107,27 @@ map("n", "<leader>a", function() require("harpoon.mark").add_file() end, { desc = "Add file to harpoon", remap = true }) -map("n", "<leader>q", function() +map("n", "<leader>1", function() require("harpoon.ui").nav_file(1) end, { desc = "navigate to first harpoon mark", remap = true }) -map("n", "<leader>w", function() +map("n", "<leader>2", function() require("harpoon.ui").nav_file(2) end, { desc = "navigate to second harpoon mark", remap = true }) +map("n", "<leader>3", function() + require("harpoon.ui").nav_file(3) +end, { desc = "navigate to second harpoon mark", remap = true }) + +map("n", "<leader>4", function() + require("harpoon.ui").nav_file(4) +end, { desc = "navigate to second harpoon mark", remap = true }) + map("n", "<leader>h", "<Cmd>noh<CR>", { desc = "remove highlights", remap = true }) map("n", "<leader>j", "/<++><CR>ciw<CR><C-o>O", { desc = "jump to <++>", remap = true }) map("n", "<leader><space>", "<Cmd>bprevious<CR>", { desc = "Jump to recently used buffer" }) map("n", "gl", "<cmd>lua vim.diagnostic.open_float()<CR>", { desc = "Line diagnostics", remap = true }) --- oil.nvim keymaps --- map("n", "<leader>e", function() --- if vim.o.filetype == "oil" then --- vim.cmd("bd") --- else --- vim.cmd("vsplit | vertical resize -60 | wincmd r") --- require("oil").open() --- end --- end, { desc = "Open Oil.nvim ins split mode", remap = true }) map("n", "-", "<cmd>Oil<CR>", { desc = "Open Oil.nvim", remap = true }) -- competitest keymaps diff --git a/nvim/.config/nvim/lua/config/lazy.lua b/nvim/.config/nvim/lua/config/lazy.lua index e5f5d91..674639d 100644 --- a/nvim/.config/nvim/lua/config/lazy.lua +++ b/nvim/.config/nvim/lua/config/lazy.lua @@ -11,8 +11,11 @@ require("lazy").setup({ -- add LazyVim and import its plugins { "LazyVim/LazyVim", import = "lazyvim.plugins" }, -- import any extras modules here - -- { import = "lazyvim.plugins.extras.lang.typescript" }, - -- { import = "lazyvim.plugins.extras.lang.json" }, + -- for typescript, LazyVim also includes extra specs to properly setup lspconfig, + -- treesitter, mason and typescript.nvim. So instead of the above, you can use: + { import = "lazyvim.plugins.extras.lang.typescript" }, + -- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc + { import = "lazyvim.plugins.extras.lang.json" }, -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, -- import/override with your plugins { import = "plugins" }, diff --git a/nvim/.config/nvim/lua/config/options.lua b/nvim/.config/nvim/lua/config/options.lua index c245255..c86b443 100644 --- a/nvim/.config/nvim/lua/config/options.lua +++ b/nvim/.config/nvim/lua/config/options.lua @@ -21,4 +21,5 @@ end -- g:neovide_transparency should be 0 if you want to unify transparency of content and title bar. vim.g.neovide_transparency = 0.5 vim.g.transparency = 0.8 +vim.g.cmdheight = 1 vim.g.neovide_background_color = "#0A0E14" .. alpha() diff --git a/nvim/.config/nvim/lua/plugins/competitest.lua b/nvim/.config/nvim/lua/plugins/competitest.lua index 9004051..719b3a8 100644 --- a/nvim/.config/nvim/lua/plugins/competitest.lua +++ b/nvim/.config/nvim/lua/plugins/competitest.lua @@ -58,7 +58,6 @@ return { height = 0.5, show_nu = true, show_rnu = false, - close_mappings = { "q", "Q" }, }, }, popup_ui = { diff --git a/nvim/.config/nvim/lua/plugins/lualine-macro-recording.lua b/nvim/.config/nvim/lua/plugins/lualine-macro-recording.lua index e69de29..a564707 100644 --- a/nvim/.config/nvim/lua/plugins/lualine-macro-recording.lua +++ b/nvim/.config/nvim/lua/plugins/lualine-macro-recording.lua @@ -0,0 +1 @@ +return {} diff --git a/nvim/.config/nvim/lua/plugins/main.lua b/nvim/.config/nvim/lua/plugins/main.lua index 1204e8f..a593259 100644 --- a/nvim/.config/nvim/lua/plugins/main.lua +++ b/nvim/.config/nvim/lua/plugins/main.lua @@ -45,15 +45,6 @@ return { }, }, - - - -- for typescript, LazyVim also includes extra specs to properly setup lspconfig, - -- treesitter, mason and typescript.nvim. So instead of the above, you can use: - { import = "lazyvim.plugins.extras.lang.typescript" }, - -- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc - { import = "lazyvim.plugins.extras.lang.json" }, - - -- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above -- would overwrite `ensure_installed` with the new value. -- If you'd rather extend the default config, use the code below instead: diff --git a/nvim/.config/nvim/lua/plugins/obsidian.lua b/nvim/.config/nvim/lua/plugins/obsidian.lua index 64f119d..bba856e 100644 --- a/nvim/.config/nvim/lua/plugins/obsidian.lua +++ b/nvim/.config/nvim/lua/plugins/obsidian.lua @@ -3,6 +3,7 @@ return { version = "*", -- recommended, use latest release instead of latest commit lazy = true, ft = "markdown", + -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: -- event = { -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. @@ -18,12 +19,16 @@ return { -- see below for full list of optional dependencies 👇 }, opts = { + disable_frontmatter = true, workspaces = { { name = "personal", path = "/mnt/Storage/omar/volty", }, }, + templates = { + folder = "5 - Template", + }, }, keys = { { diff --git a/nvim/.config/nvim/lua/plugins/telescope.lua b/nvim/.config/nvim/lua/plugins/telescope.lua index b9f4a46..f8dcfc5 100644 --- a/nvim/.config/nvim/lua/plugins/telescope.lua +++ b/nvim/.config/nvim/lua/plugins/telescope.lua @@ -16,6 +16,11 @@ return { false, }, { + "<leader>fq", + "<Cmd>Telescope quickfix<CR>", + desc = "Find quickfix list", + }, + { "<leader>fp", function() require("telescope.builtin").lsp_document_symbols() @@ -24,13 +29,18 @@ return { }, { "<leader>fd", - "<Cmd>Telescope find_files<CR>", - desc = "Find Buffer", + "<Cmd>Telescope diagnostics<CR>", + desc = "Find diagnostics in current project", }, { "<leader>ff", + "<Cmd>Telescope find_files<CR>", + desc = "Find files in current project", + }, + { + "<leader>fg", "<Cmd>Telescope git_files<CR>", - desc = "Find Buffer", + desc = "Find git files in current project", }, { "<leader>fb", diff --git a/nvim/.config/nvim/lua/plugins/undotree.lua b/nvim/.config/nvim/lua/plugins/undotree.lua new file mode 100644 index 0000000..a09ac4a --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/undotree.lua @@ -0,0 +1,12 @@ +return { + "mbbill/undotree", + lazy = false, + + keys = { + { + "<leader>ut", + "<Cmd>UndotreeToggle<CR>", + desc = "Toggle UndoTree", + }, + }, +} diff --git a/nvim/.config/nvim/spell/en.utf-8.add b/nvim/.config/nvim/spell/en.utf-8.add new file mode 100644 index 0000000..c31de31 --- /dev/null +++ b/nvim/.config/nvim/spell/en.utf-8.add @@ -0,0 +1 @@ +Rustaceans diff --git a/nvim/.config/nvim/spell/en.utf-8.add.spl b/nvim/.config/nvim/spell/en.utf-8.add.spl Binary files differnew file mode 100644 index 0000000..99929ea --- /dev/null +++ b/nvim/.config/nvim/spell/en.utf-8.add.spl |
