diff options
author | Luca Matei Pintilie <lucafulger@gmail.com> | 2023-04-01 19:46:14 +0000 |
---|---|---|
committer | Luca Matei Pintilie <lucafulger@gmail.com> | 2023-04-01 19:46:14 +0000 |
commit | 13a10383f190fdc2f4cc95c0b104627fe375c66f (patch) | |
tree | 6d3714eae69088d7e26789960eb8864a1c35e23d /.config/nvim | |
parent | e4588098e2c76fac277f3598c8d0e2c60722f1ab (diff) | |
download | dotfiles-13a10383f190fdc2f4cc95c0b104627fe375c66f.tar dotfiles-13a10383f190fdc2f4cc95c0b104627fe375c66f.tar.gz dotfiles-13a10383f190fdc2f4cc95c0b104627fe375c66f.tar.bz2 dotfiles-13a10383f190fdc2f4cc95c0b104627fe375c66f.tar.lz dotfiles-13a10383f190fdc2f4cc95c0b104627fe375c66f.tar.xz dotfiles-13a10383f190fdc2f4cc95c0b104627fe375c66f.tar.zst dotfiles-13a10383f190fdc2f4cc95c0b104627fe375c66f.zip |
Improve IDE related configs
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/lua/keybinds.lua | 8 | ||||
-rw-r--r-- | .config/nvim/lua/plugins.lua | 34 |
2 files changed, 40 insertions, 2 deletions
diff --git a/.config/nvim/lua/keybinds.lua b/.config/nvim/lua/keybinds.lua index 372335a..b017716 100644 --- a/.config/nvim/lua/keybinds.lua +++ b/.config/nvim/lua/keybinds.lua @@ -2,6 +2,7 @@ local telescope = require("telescope.builtin") local wk = require("which-key") local ufo = require("ufo") local nt_api = require("nvim-tree.api") +local spider = require("spider") vim.g.mapleader = " " @@ -23,6 +24,7 @@ vim.keymap.set("n", "<Leader>f", telescope.find_files) vim.keymap.set("n", "<Leader><TAB>", telescope.buffers) vim.keymap.set("n", "<Leader>D", telescope.lsp_definitions) vim.keymap.set("n", "<Leader>R", telescope.lsp_references) +vim.keymap.set("n", "<Leader>S", telescope.lsp_document_symbols) vim.keymap.set("n", "<Leader>m", ":MinimapToggle<CR>") vim.keymap.set("n", "<Leader>b", ":Gitsigns blame_line<CR>") @@ -36,12 +38,18 @@ vim.keymap.set("n", "<Leader>[", ufo.openAllFolds) vim.keymap.set("n", "<Leader>]", ufo.closeAllFolds) vim.keymap.set("n", "<Leader>r", vim.lsp.buf.rename) +vim.keymap.set({ "n"; "o"; "x" }, "W", function() spider.motion("w") end) +vim.keymap.set({ "n"; "o"; "x" }, "E", function() spider.motion("e") end) +vim.keymap.set({ "n"; "o"; "x" }, "B", function() spider.motion("b") end) +vim.keymap.set({ "n"; "o"; "x" }, "gE", function() spider.motion("ge") end) + vim.opt.whichwrap = "<,>,h,l,[,]" wk.register({ ["<CR>"] = "Quick Action"; ["K"] = "Hover"; ["D"] = "Definition"; + ["S"] = "Symbols"; ["F"] = "Format"; ["f"] = "Find files"; ["<TAB>"] = "Show buffers"; diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index d261628..f4b9ba5 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -6,6 +6,9 @@ local PKGS = { { url = "https://github.com/kyazdani42/nvim-web-devicons.git" }; { url = "https://github.com/ojroques/nvim-osc52.git" }; { url = "https://github.com/chentoast/marks.nvim.git" }; + { url = "https://github.com/chrisgrieser/nvim-spider.git" }; + { url = "https://github.com/nvim-orgmode/orgmode.git" }; + { url = "https://github.com/rainbowhxch/beacon.nvim.git" }; { url = "https://github.com/kyazdani42/nvim-tree.lua.git" }; { url = "https://github.com/nvim-telescope/telescope.nvim.git" }; @@ -140,6 +143,19 @@ local function init_plugins() -- Available modes: foreground, background mode = "foreground"; -- Set the display mode. }) + require("beacon").setup({ + enable = true; + size = 100; + fade = true; + minimal_jump = 10; + show_jumps = true; + focus_gained = false; + shrink = false; + timeout = 1000; + ignore_buffers = {}; + ignore_filetypes = {}; + }) + vim.g.minimap_auto_start = 0 vim.g.minimap_highlight_range = 1 vim.g.minimap_highlight_search = 1 @@ -170,12 +186,26 @@ local function init_plugins() require("devcontainer").setup({}) require("which-key").setup({}) + local orgmode = require("orgmode") + orgmode.setup_ts_grammar() require("nvim-treesitter.configs").setup({ - ensure_installed = { "javascript"; "typescript"; "lua"; "c_sharp"; "jsonc" }; + ensure_installed = { + "javascript"; + "typescript"; + "lua"; + "c_sharp"; + "jsonc"; + "org"; + }; sync_install = false; auto_install = true; - highlight = { enable = true; disable = { "markdown"; "yaml"; "sql"; "help" } }; + highlight = { + enable = true; + disable = { "markdown"; "yaml"; "sql"; "help" }; + additional_vim_regex_highlighting = { "org" }; + }; }) + orgmode.setup({ org_default_notes_file = "~/.cache/org/refile.org" }) require("mini.surround").setup({}) |