From 23df368b00bda0ed4a01fac92f7ad80998c1d34a Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Sat, 21 May 2022 16:48:47 +0200 Subject: refactor: load the default options once (#2592) BREAKING CHANGE: modifying the default options for keymaps and autocmds is now done by overwriting them, since they won't be loaded into the global `lvim` table anymore * refactor: use the lua-commands api * refactor!: use the lua-autocmds api * fix(settings): let neovim handle spellfile * feat: add log:set_log_level() * chore: update examples * chore: add deprecation notice for custom_groups --- utils/installer/config_win.example.lua | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'utils/installer/config_win.example.lua') diff --git a/utils/installer/config_win.example.lua b/utils/installer/config_win.example.lua index b659263a..78468194 100644 --- a/utils/installer/config_win.example.lua +++ b/utils/installer/config_win.example.lua @@ -37,9 +37,9 @@ lvim.leader = "space" -- add your own keymapping lvim.keys.normal_mode[""] = ":w" -- unmap a default keymapping --- lvim.keys.normal_mode[""] = false --- edit a default keymapping --- lvim.keys.normal_mode[""] = ":q" +-- vim.keymap.del("n", "") +-- override a default keymapping +-- lvim.keys.normal_mode[""] = ":q" -- or vim.keymap.set("n", "", ":q" ) -- Change Telescope navigation to use j and k for navigation and n and p for history in both input and normal mode. -- we use protected-mode (pcall) just in case the plugin wasn't loaded yet. @@ -168,6 +168,15 @@ lvim.builtin.treesitter.highlight.enabled = true -- } -- Autocommands (https://neovim.io/doc/user/autocmd.html) --- lvim.autocommands.custom_groups = { --- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" }, --- } +-- vim.api.nvim_create_autocmd("BufEnter", { +-- pattern = { "*.json", "*.jsonc" }, +-- -- enable wrap mode for json files only +-- command = "setlocal wrap", +-- }) +-- vim.api.nvim_create_autocmd("FileType", { +-- pattern = "zsh", +-- callback = function() +-- -- let treesitter use bash highlight for zsh files as well +-- require("nvim-treesitter.highlight").attach(0, "bash") +-- end, +-- }) -- cgit v1.2.3