From 2143dee6dc9d60d144537d64500abc0f62782ad9 Mon Sep 17 00:00:00 2001 From: Luca Matei Pintilie Date: Sat, 8 Oct 2022 18:30:18 +0200 Subject: Neovim colorizer changes and save and quit keybinds added --- .config/nvim/lua/general.lua | 4 ++-- .config/nvim/lua/keybinds.lua | 4 ++++ .config/nvim/lua/plugins.lua | 15 ++++++++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.config/nvim/lua/general.lua b/.config/nvim/lua/general.lua index ab386b9..b7e3cef 100644 --- a/.config/nvim/lua/general.lua +++ b/.config/nvim/lua/general.lua @@ -26,9 +26,9 @@ vim.g.markdown_fenced_languages = { "yaml"; "sql"; "sh"; - "console"; + "console=sh"; "cs"; - "ini"; + "ini=toml"; } if vim.fn.has("wsl") == 1 then diff --git a/.config/nvim/lua/keybinds.lua b/.config/nvim/lua/keybinds.lua index 8be4c7f..80a058f 100644 --- a/.config/nvim/lua/keybinds.lua +++ b/.config/nvim/lua/keybinds.lua @@ -26,6 +26,8 @@ vim.keymap.set("n", "", telescope.buffers) vim.keymap.set("n", "m", ":MinimapToggle") vim.keymap.set("n", ",", ":TroubleToggle") vim.keymap.set("n", "t", ":belowright split | resize 5 | terminal") +vim.keymap.set("n", "s", ":w") +vim.keymap.set("n", "q", ":q") vim.keymap.set("n", "[", ufo.openAllFolds) vim.keymap.set("n", "]", ufo.closeAllFolds) @@ -48,5 +50,7 @@ wk.register({ ["m"] = "Toggle Minimap"; ["d"] = "Show diagnostics"; ["t"] = "Open terminal"; + ["s"] = "Save file"; + ["q"] = "Quit"; }, { prefix = "" }); diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 3ba6799..1f173da 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -13,6 +13,7 @@ local PKGS = { { url = "https://github.com/iamcco/markdown-preview.nvim.git" }; { url = "https://github.com/filipdutescu/renamer.nvim.git" }; { url = "https://github.com/folke/which-key.nvim.git" }; + { url = "https://github.com/tpope/vim-abolish.git" }; -- Status line { url = "https://github.com/akinsho/bufferline.nvim.git" }; @@ -116,7 +117,18 @@ local function init_plugins() show_current_context_start = true; } - require("colorizer").setup({ "*" }) + require("colorizer").setup({ "*" }, { + RGB = true; -- #RGB hex codes + RRGGBB = true; -- #RRGGBB hex codes + names = true; -- "Name" codes like Blue + RRGGBBAA = false; -- #RRGGBBAA hex codes + rgb_fn = false; -- CSS rgb() and rgba() functions + hsl_fn = false; -- CSS hsl() and hsla() functions + css = false; -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = false; -- Enable all CSS *functions*: rgb_fn, hsl_fn + -- Available modes: foreground, background + mode = "foreground"; -- Set the display mode. + }) vim.g.minimap_auto_start = 1 vim.g.minimap_highlight_range = 1 vim.g.minimap_highlight_search = 1 @@ -163,6 +175,7 @@ local function init_plugins() -- or leave it empty to use the default settings -- refer to the configuration section below }) + vim.fn["mkdp#util#install"]() end -- cgit v1.2.3