From 3526eb6d756e3c37190814eca2e22ce9f7d9f1de Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Fri, 28 Jun 2024 01:24:13 +0800 Subject: Update --- vim/lua/configs/conform.lua | 6 +++--- vim/lua/configs/telescope.lua | 6 +++++- vim/lua/plugins/init.lua | 11 ++++++++++- 3 files changed, 18 insertions(+), 5 deletions(-) (limited to 'vim/lua') diff --git a/vim/lua/configs/conform.lua b/vim/lua/configs/conform.lua index 411336e..b6fa6bb 100644 --- a/vim/lua/configs/conform.lua +++ b/vim/lua/configs/conform.lua @@ -1,12 +1,12 @@ local options = { formatters_by_ft = { lua = { "stylua" }, - css = { "prettier" }, - html = { "prettier" }, - markdown = { "prettier" }, sh = {"shfmt"}, bash = {"shfmt"}, zsh = {"shfmt"}, + markdown = { "prettier" }, + css = { "prettier" }, + html = { "prettier" }, }, -- format_on_save = { diff --git a/vim/lua/configs/telescope.lua b/vim/lua/configs/telescope.lua index 60828e9..70eddf4 100644 --- a/vim/lua/configs/telescope.lua +++ b/vim/lua/configs/telescope.lua @@ -6,6 +6,10 @@ return { -- [""] = "move_selection_previous", [""] = require("telescope.actions.layout").toggle_preview, [""] = false, + [""] = function(p_bufnr) + require("telescope.actions").send_selected_to_qflist(p_bufnr) + vim.cmd.cfdo("edit") + end, }, }, layout_config = { @@ -45,7 +49,7 @@ return { }, }, }, - on_attach = function () + on_attach = function() require("telescope").load_extension("aerial") end } diff --git a/vim/lua/plugins/init.lua b/vim/lua/plugins/init.lua index f54e21d..c74e8d4 100644 --- a/vim/lua/plugins/init.lua +++ b/vim/lua/plugins/init.lua @@ -138,6 +138,14 @@ return { -- end -- return tostring(os.time()) .. suffix end, + -- Optional, for templates (see below). + templates = { + folder = "templates", + date_format = "%Y-%m-%d", + time_format = "%H:%M", + -- A map for custom variables, the key should be the variable and the value a function + substitutions = {}, + }, }, }, @@ -209,9 +217,10 @@ return { opts = { automatically_installation = true, ensure_installed = { + "vim-language-server", + "lua-language-server", "css-lsp", "html-lsp", - "lua-language-server", "prettier", "stylua", }, -- cgit v1.2.3-70-g09d2