Skip to content

Commit

Permalink
fix(#26): set signcolumn to yes for netrw buffers (#27)
Browse files Browse the repository at this point in the history
Some users may want to disable the signcolumn globally, and still use
the netrw plugin. This change sets the signcolumn value to `yes`
locally.

Fixes #26. Thank you @shesmu for raising the issue and suggesting to
make it part of the plugin :)
  • Loading branch information
prichrd authored Jan 12, 2024
1 parent 596435b commit e6e1dda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
stds.nvim = {
read_globals = {
globals = {
"vim",
},
}
std = "lua51+nvim"

include_files = {
"lua/**/*.lua",
"lua/**/*.lua",
}
3 changes: 3 additions & 0 deletions lua/netrw/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ function M.setup(options)
return
end

-- Forces the usage of signcolumn in netrw buffers.
vim.opt_local.signcolumn = "yes"

local bufnr = vim.api.nvim_get_current_buf()
require("netrw.ui").embelish(bufnr)
require("netrw.actions").bind(bufnr)
Expand Down

0 comments on commit e6e1dda

Please sign in to comment.