diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-09-19 20:26:54 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-09-19 20:26:54 +0200 |
commit | 4b90644bc355441d05fb1a217e7d828f1cfd77b8 (patch) | |
tree | ed5ff7fa3b2ada7da4a4f89bff26424cf0f805a6 | |
parent | cb36ccfa8db66db953795fd8e22138ed1712b1cd (diff) |
checkpoint
- edited pairs
- changed surround mappings to "gs"
- added highlighting for urls
-rw-r--r-- | after/plugin/autoclose.lua | 11 | ||||
-rw-r--r-- | after/plugin/mini.lua | 11 | ||||
-rw-r--r-- | after/plugin/treesitter.lua | 2 | ||||
-rw-r--r-- | lua/config/autocmds.lua | 3 | ||||
-rw-r--r-- | lua/config/set.lua | 5 |
5 files changed, 21 insertions, 11 deletions
diff --git a/after/plugin/autoclose.lua b/after/plugin/autoclose.lua index 1c912da..90a4e4b 100644 --- a/after/plugin/autoclose.lua +++ b/after/plugin/autoclose.lua @@ -18,12 +18,7 @@ local filetypes = require("autoclose").setup({ ["{"] = { escape = false, close = true, pair = "{}" }, ["}"] = { escape = true, close = false, pair = "{}" }, [">"] = { escape = true, close = false, pair = "<>" }, - ['"'] = { - escape = true, - close = true, - pair = '""', - disabled_filetypes = { "text", "telekasten", "groff", "diff", "gitcommit", "fugitive", "markdown" }, - }, + ['"'] = { escape = true, close = true, pair = '""' }, ["'"] = { escape = true, close = true, @@ -35,10 +30,8 @@ local filetypes = require("autoclose").setup({ escape = true, close = true, pair = "``", - enabled_fileptypes = { "markdown" }, + enabled_fileptypes = { "markdown", "go", "javascript" }, }, - ["*"] = { escape = true, close = true, pair = "**", enabled_filetypes = { "markdown" } }, - ["_"] = { escape = true, close = true, pair = "__", enabled_filetypes = { "markdown" } }, }, options = { disable_when_touch = true, diff --git a/after/plugin/mini.lua b/after/plugin/mini.lua index a347f4c..6a35641 100644 --- a/after/plugin/mini.lua +++ b/after/plugin/mini.lua @@ -3,5 +3,14 @@ require("mini.statusline").setup({ }) require("mini.surround").setup({ - silent = true + silent = true, + mappings = { + add = "gsa", -- Add surrounding in Normal and Visual modes + delete = "gsd", -- Delete surrounding + find = "gsf", -- Find surrounding (to the right) + find_left = "gsF", -- Find surrounding (to the left) + highlight = "gsh", -- Highlight surrounding + replace = "gsr", -- Replace surrounding + update_n_lines = "gsn", -- Update `n_lines` + }, }) diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua index 83eb7cf..7a1e26f 100644 --- a/after/plugin/treesitter.lua +++ b/after/plugin/treesitter.lua @@ -15,3 +15,5 @@ require("nvim-treesitter.configs").setup({ }, }, }) +-- vim.api.nvim_buf_create_user_command +-- vim.keymap.set("n", "") diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index 61dc98d..d39ab1a 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -93,3 +93,6 @@ autocmd({ "BufNewFile", "BufRead" }, { end end, }) + +-- Automatically resize panes +autocmd("VimResized", { pattern = "*", command = "wincmd =" }) diff --git a/lua/config/set.lua b/lua/config/set.lua index ce43d04..8ddc23c 100644 --- a/lua/config/set.lua +++ b/lua/config/set.lua @@ -110,5 +110,8 @@ vim.diagnostic.config({ float = { border = _border }, }) --- highlight to-do's +-- Highlighting vim.cmd("match Todo /\\(TODO\\|FIXME\\):/") + +vim.cmd("match matchURL /" .. "\\(https\\?\\|ftp\\|magnet\\):\\/\\/[[:alnum:]%\\/_#.-~:]*" .. "/") +vim.cmd("hi matchURL guifg=" .. require("nord.colors").palette.aurora.yellow) |