diff --git a/README.md b/README.md index e18087bb..ff540725 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,8 @@ require'nvim-tree'.setup { list = {} }, number = false, - relativenumber = false + relativenumber = false, + signcolumn = "yes" }, trash = { cmd = "trash", diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index ee26220a..ce99a021 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -112,6 +112,7 @@ function. auto_resize = false, number = false, relativenumber = false, + signcolumn = "yes" mappings = { custom_only = false, list = {} @@ -303,6 +304,11 @@ Here is a list of the options available in the setup call: type: `boolean` default: false + - |view.signcolumn|: show diagnostic sign column. Value can be `"yes"`, + `"auto"`, `"no"` + type: `string` + default: `"yes"` + - |view.mappings|: configuration options for keymaps - |view.mappings.custom_only|: will use only the provided user mappings and not the default diff --git a/lua/nvim-tree/view.lua b/lua/nvim-tree/view.lua index a9374b35..0d956db4 100644 --- a/lua/nvim-tree/view.lua +++ b/lua/nvim-tree/view.lua @@ -117,7 +117,8 @@ local DEFAULT_CONFIG = { list = {} }, number = false, - relativenumber = false + relativenumber = false, + signcolumn = 'yes' } local function merge_mappings(user_mappings) @@ -152,6 +153,7 @@ function M.setup(opts) M.View.auto_resize = opts.auto_resize M.View.winopts.number = options.number M.View.winopts.relativenumber = options.relativenumber + M.View.winopts.signcolumn = options.signcolumn if options.mappings.custom_only then M.View.mappings = options.mappings.list else