Skip to content

Commit

Permalink
fix(keymap): replace vim-gh-line with openingh because of keymap issues
Browse files Browse the repository at this point in the history
  • Loading branch information
steinbrueckri committed Sep 26, 2024
1 parent 8c4d2be commit ce64f19
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand All @@ -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" }
}
2 changes: 1 addition & 1 deletion .config/nvim/lua/keymap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ vim.api.nvim_set_keymap("n", "<leader>gd", ":DiffviewOpen<CR>", { noremap = true
-- Diff close
vim.api.nvim_set_keymap("n", "<leader>gD", ":DiffviewClose<CR>", { noremap = true, silent = true })
-- Show line on GitHub
vim.api.nvim_set_keymap("n", "<leader>gg", ":GHInteractive<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<leader>gg", ":OpenInGHFileLines<CR>", { noremap = true, silent = true })
-- Yolo commit
vim.api.nvim_set_keymap("n", "<leader>gY", ":Git yolo<CR>", { noremap = true, silent = true })
-- Open Neogit
Expand Down
4 changes: 4 additions & 0 deletions .config/nvim/lua/plugins/openingh.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
return {
"almo7aya/openingh.nvim",
event = "VeryLazy",
}
1 change: 0 additions & 1 deletion .config/nvim/lua/plugins/vim-gh-line.lua

This file was deleted.

95 changes: 48 additions & 47 deletions .config/nvim/lua/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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", "<leader>tq", toggleQf, {})
Expand All @@ -44,52 +44,53 @@ vim.keymap.set("n", "[q", ":cprev<CR>", {})
-----------------------------------------------------------
-- 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
-----------------------------------------------------------
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

0 comments on commit ce64f19

Please sign in to comment.