diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index b21cd00..b40c78f 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -46,6 +46,7 @@ "nvim-treesitter": { "branch": "master", "commit": "0c8a582e474e248f2a4406188e0c653f92a064cf" }, "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" }, "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, + "openingh.nvim": { "branch": "main", "commit": "613c18967d42202f3e2a9ac788caf62a402e7c1a" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "project.nvim": { "branch": "main", "commit": "2aa7f746a6a048738eace3f1c9e834243b9faad6" }, "qmk.nvim": { "branch": "main", "commit": "ad51cb15e607da0983fcf9882d38a2aafac32149" }, @@ -64,7 +65,6 @@ "vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" }, "vim-dadbod-completion": { "branch": "master", "commit": "880f7e9f2959e567c718d52550f9fae1aa07aa81" }, "vim-dadbod-ui": { "branch": "master", "commit": "f29c85ab42861c6ef683289b0c6a51e0d436dcf6" }, - "vim-gh-line": { "branch": "master", "commit": "731751fdfa4f64a061dbc7088cb7b2f12e0828ad" }, "vim-smoothie": { "branch": "master", "commit": "df1e324e9f3395c630c1c523d0555a01d2eb1b7e" }, "yanky.nvim": { "branch": "main", "commit": "73215b77d22ebb179cef98e7e1235825431d10e4" } } diff --git a/.config/nvim/lua/keymap.lua b/.config/nvim/lua/keymap.lua index 8f5a3b8..ce89c18 100644 --- a/.config/nvim/lua/keymap.lua +++ b/.config/nvim/lua/keymap.lua @@ -105,7 +105,7 @@ vim.api.nvim_set_keymap("n", "gd", ":DiffviewOpen", { noremap = true -- Diff close vim.api.nvim_set_keymap("n", "gD", ":DiffviewClose", { noremap = true, silent = true }) -- Show line on GitHub -vim.api.nvim_set_keymap("n", "gg", ":GHInteractive", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "gg", ":OpenInGHFileLines", { noremap = true, silent = true }) -- Yolo commit vim.api.nvim_set_keymap("n", "gY", ":Git yolo", { noremap = true, silent = true }) -- Open Neogit diff --git a/.config/nvim/lua/plugins/openingh.lua b/.config/nvim/lua/plugins/openingh.lua new file mode 100644 index 0000000..368bda9 --- /dev/null +++ b/.config/nvim/lua/plugins/openingh.lua @@ -0,0 +1,4 @@ +return { + "almo7aya/openingh.nvim", + event = "VeryLazy", +} diff --git a/.config/nvim/lua/plugins/vim-gh-line.lua b/.config/nvim/lua/plugins/vim-gh-line.lua deleted file mode 100644 index bbe7777..0000000 --- a/.config/nvim/lua/plugins/vim-gh-line.lua +++ /dev/null @@ -1 +0,0 @@ -return { "ruanyl/vim-gh-line", event = "VeryLazy" } diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua index b1e6bb1..c4aacaa 100644 --- a/.config/nvim/lua/settings.lua +++ b/.config/nvim/lua/settings.lua @@ -2,11 +2,11 @@ -- Neovim API aliases ----------------------------------------------------------- local cmd = vim.cmd -- execute Vim commands -local g = vim.g -- global variables +local g = vim.g -- global variables local b = vim.b local a = vim.api local opt = vim.opt -- global/buffer/windows-scoped options -local wo = vim.wo -- windows-local options +local wo = vim.wo -- windows-local options ----------------------------------------------------------- -- Keybindings @@ -29,12 +29,12 @@ a.nvim_set_keymap("v", ">", ">gv", { noremap = true, silent = true }) -- better quickfix list stuff local function toggleQf() - local ft = vim.bo.filetype - if ft == "qf" then - vim.cmd.cclose() - else - vim.cmd.copen() - end + local ft = vim.bo.filetype + if ft == "qf" then + vim.cmd.cclose() + else + vim.cmd.copen() + end end vim.keymap.set("n", "tq", toggleQf, {}) @@ -44,47 +44,47 @@ vim.keymap.set("n", "[q", ":cprev", {}) ----------------------------------------------------------- -- General ----------------------------------------------------------- -wo.cursorline = true -- cursor in line +wo.cursorline = true -- cursor in line -- wo.cursorcolumn = true -- cursor in column -opt.shell = "/bin/bash" -- I use fish but it slow for running internal commands -g.mapleader = " " -- change leader to a space -g.maplocalleader = "," -- change localleader to a comma -opt.mouse = "a" -- enable mouse support -opt.clipboard = "unnamedplus" -- copy/paste to system clipboard -opt.swapfile = false -- don't use swapfile -local undodir = os.getenv("HOME") .. "/tmp/undodir/" -- undofile related +opt.shell = "/bin/bash" -- I use fish but it slow for running internal commands +g.mapleader = " " -- change leader to a space +g.maplocalleader = "," -- change localleader to a comma +opt.mouse = "a" -- enable mouse support +opt.clipboard = "unnamedplus" -- copy/paste to system clipboard +opt.swapfile = false -- don't use swapfile +local undodir = os.getenv("HOME") .. "/tmp/undodir/" -- undofile related os.execute("test -d " .. undodir .. " || mkdir -p " .. undodir) -- undofile related -opt.undodir = undodir -- undofile related -opt.undofile = true -- undofile related -opt.undolevels = 10000 -- undofile related -opt.undoreload = 10000 -- undofile related -opt.number = true -- show line number -opt.relativenumber = true -- relative file numbers -opt.nu = true -- relative file numbers -opt.rnu = true -- relative file numbers -opt.showmatch = true -- highlight matching parenthesis -opt.foldmethod = "marker" -- enable folding (default 'foldmarker') -opt.colorcolumn = "80" -- line lenght marker at 80 columns -opt.splitright = true -- vertical split to the right -opt.splitbelow = true -- orizontal split to the bottom -opt.ignorecase = true -- ignore case letters when search -opt.smartcase = true -- ignore lowercase for the whole pattern -opt.hlsearch = true -- highlight searches -opt.termguicolors = true -- we support termguicolors -opt.updatetime = 300 -- more responsiveness -opt.scrolloff = 5 -- scrolling "bounding" -opt.sidescrolloff = 5 -- scrolling "bounding" -opt.laststatus = 3 -- global statusline enable -opt.hidden = true -- abandon buffer when unloading -opt.backup = false -- some language servers dont like backup files -opt.writebackup = false -- some language servers dont like backup files -opt.shortmess = vim.o.shortmess .. "c" -- avoid some prompts? -opt.tabstop = 2 -- buffer options -opt.softtabstop = 2 -- implicit tab size -opt.shiftwidth = 2 -- another kind of stabstop -opt.expandtab = true -- convert tabs to spaces -opt.autoindent = true -- convert tabs to spaces -opt.signcolumn = "yes" -- put numbers and signs in the same column +opt.undodir = undodir -- undofile related +opt.undofile = true -- undofile related +opt.undolevels = 10000 -- undofile related +opt.undoreload = 10000 -- undofile related +opt.number = true -- show line number +opt.relativenumber = true -- relative file numbers +opt.nu = true -- relative file numbers +opt.rnu = true -- relative file numbers +opt.showmatch = true -- highlight matching parenthesis +opt.foldmethod = "marker" -- enable folding (default 'foldmarker') +opt.colorcolumn = "80" -- line lenght marker at 80 columns +opt.splitright = true -- vertical split to the right +opt.splitbelow = true -- orizontal split to the bottom +opt.ignorecase = true -- ignore case letters when search +opt.smartcase = true -- ignore lowercase for the whole pattern +opt.hlsearch = true -- highlight searches +opt.termguicolors = true -- we support termguicolors +opt.updatetime = 300 -- more responsiveness +opt.scrolloff = 5 -- scrolling "bounding" +opt.sidescrolloff = 5 -- scrolling "bounding" +opt.laststatus = 3 -- global statusline enable +opt.hidden = true -- abandon buffer when unloading +opt.backup = false -- some language servers dont like backup files +opt.writebackup = false -- some language servers dont like backup files +opt.shortmess = vim.o.shortmess .. "c" -- avoid some prompts? +opt.tabstop = 2 -- buffer options +opt.softtabstop = 2 -- implicit tab size +opt.shiftwidth = 2 -- another kind of stabstop +opt.expandtab = true -- convert tabs to spaces +opt.autoindent = true -- convert tabs to spaces +opt.signcolumn = "yes" -- put numbers and signs in the same column ----------------------------------------------------------- -- Other stuff @@ -92,4 +92,5 @@ opt.signcolumn = "yes" -- put numbers a g.loaded_node_provider = 0 g.loaded_ruby_provider = 0 g.loaded_perl_provider = 0 +-- needed for obsidian, move to the plugin files? opt.conceallevel = 1