Skip to content

Commit

Permalink
fix(nvim): local options
Browse files Browse the repository at this point in the history
  • Loading branch information
schardev committed Aug 15, 2024
1 parent 31cdc63 commit dc11234
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion config/nvim/after/ftplugin/c.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ vim.bo.shiftwidth = 8
vim.bo.softtabstop = 8
vim.bo.tabstop = 8

vim.wo.spell = true
vim.opt_local.spell = true
2 changes: 1 addition & 1 deletion config/nvim/after/ftplugin/gitcommit.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
vim.bo.textwidth = 80
vim.bo.spellcapcheck = ""
vim.wo.spell = true
vim.opt_local.spell = true
6 changes: 3 additions & 3 deletions config/nvim/after/ftplugin/help.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
vim.wo.colorcolumn = ""
vim.opt_local.colorcolumn = ""

-- Wrap text by default and don't break words
vim.wo.wrap = true
vim.wo.linebreak = true
vim.opt_local.wrap = true
vim.opt_local.linebreak = true
6 changes: 3 additions & 3 deletions config/nvim/after/ftplugin/html.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
vim.wo.colorcolumn = ""
vim.wo.spell = true
vim.wo.wrap = true
vim.opt_local.colorcolumn = ""
vim.opt_local.spell = true
vim.opt_local.wrap = true
2 changes: 1 addition & 1 deletion config/nvim/after/ftplugin/javascript.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
vim.wo.spell = true
vim.opt_local.spell = true
vim.opt_local.spelloptions:append("camel")
6 changes: 3 additions & 3 deletions config/nvim/after/ftplugin/markdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ end

-- There should be no restriction for 80-char limit in markdown files, so wrap
-- them but don't break words (easier to read that way)
vim.wo.wrap = true
vim.wo.linebreak = true
vim.wo.colorcolumn = ""
vim.opt_local.wrap = true
vim.opt_local.linebreak = true
vim.opt_local.colorcolumn = ""

vim.opt_local.spell = true
4 changes: 2 additions & 2 deletions config/nvim/after/ftplugin/vim.lua
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
vim.wo.foldmethod = "marker"
vim.wo.spell = true
vim.opt_local.foldmethod = "marker"
vim.opt_local.spell = true
2 changes: 2 additions & 0 deletions config/nvim/lua/plugins/gitsigns.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ return {
vnoremap("<leader>gs", function()
gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
end, { desc = "Stage hunk" })
nnoremap("<leader>gS", gs.stage_buffer, { desc = "Stage buffer" })
nnoremap("<leader>gu", gs.undo_stage_hunk, { desc = "Undo stage hunk" })
nnoremap("<leader>gr", gs.reset_hunk, { desc = "Reset hunk" })
nnoremap("<leader>gR", gs.reset_buffer, { desc = "Reset buffer" })
nnoremap("<leader>gp", gs.preview_hunk, { desc = "Preview hunk" })
nnoremap("<leader>gd", gs.diffthis, { desc = "Diffthis" })
-- nnoremap("<leader>gD", function()
Expand Down

0 comments on commit dc11234

Please sign in to comment.