diff options
author | Suleyman Farajli <suleyman@farajli.net> | 2025-06-19 01:07:18 +0400 |
---|---|---|
committer | Suleyman Farajli <suleyman@farajli.net> | 2025-06-19 01:07:18 +0400 |
commit | 09d70e1bc0bf1e5c54b3faf2918a3e14c4fc4cfc (patch) | |
tree | 2d8990fde64d5a81e65605447657c427ac4f19d4 /config/nvim/lua | |
parent | 226b3c808393b5e91e3eb6c6c591f5bc5e5d9775 (diff) |
refactor: improve Neovim config for better readability and functionality
- Switch to Lua API options for setting vim options instead of vim.cmd
- Add autocmd to trim trailing whitespace on save (except markdown)
- Disable auto-comments via autocmd for all filetypes
- Enhance and standardize key mappings with noremap and silent flags
- Clean up plugin config indentation and comments
Diffstat (limited to 'config/nvim/lua')
-rw-r--r-- | config/nvim/lua/plugins.lua | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index 911a4d7..7b00b1c 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -33,18 +33,18 @@ require("lazy").setup({ }) require("Comment").setup{ - padding = true, -- Add a space b/w comment and the line - sticky = true, -- Whether the cursor should stay at its position - ignore = nil, -- Lines to be ignored while (un)comment + padding = true, -- Add a space b/w comment and the line + sticky = true, -- Whether the cursor should stay at its position + ignore = nil, -- Lines to be ignored while (un)comment -- LHS of toggle mappings in NORMAL mode toggler = { - line = 'cc', --Line-comment toggle keymap - block = 'cb', -- Block-comment toggle keymap + line = 'cc', --Line-comment toggle keymap + block = 'cb', -- Block-comment toggle keymap }, -- LHS of operator-pending mappings in NORMAL and VISUAL mode opleader = { - line = 'cc', --Line-comment keymap - block = 'cb', --Block-comment keymap + line = 'cc', --Line-comment keymap + block = 'cb', --Block-comment keymap }, } @@ -72,25 +72,21 @@ require("neo-tree").setup({ } } }, - --Indent Markers default_component_configs = { indent = { + --Indent Markers with_markers = true, indent_marker = "│", last_indent_marker = "└", indent_size = 2, - }, - }, - --Expanders - default_component_configs = { - indent = { + -- Expanders with_expanders = false, --Not active expander_collapsed = ">", expander_expanded = "", expander_highlight = "NeoTreeExpander", + }, }, - }) require("nvim-autopairs").setup({ |