feat: noice and lua line config + multigrep search + markdown fix on treesitter

This commit is contained in:
2026-08-29 12:23:47 +02:00
parent 393bd9598b
commit 4e26404bd0
7 changed files with 142 additions and 81 deletions

View File

@@ -14,7 +14,7 @@ vim.cmd("set textwidth=0")
vim.cmd("set wrapmargin=0")
vim.cmd("set linebreak")
-- vim.cmd("set colorcolumn=85")
-- vim.cmd("set conceallevel=0") -- DONT hide characters in MD
vim.cmd("set conceallevel=0") -- DONT hide characters in MD
vim.cmd("set tabstop=4")
vim.cmd("set shiftwidth=4")
vim.cmd("set noexpandtab") -- expandtab to use spaces instead of tabs

View File

@@ -25,7 +25,7 @@
"nvim-colorizer.lua": { "branch": "master", "commit": "72a05f62c52241bc7441c820eb53946f92b2e6a4" },
"nvim-lint": { "branch": "master", "commit": "3d55c8f67c6ae5c15e1042571e107c7a3d5c5f4e" },
"nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" },
"nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" },
"nvim-treesitter": { "branch": "main", "commit": "8b98b4470eb326f1c7b50dae79f8c963568e5720" },
"nvim-treesitter-context": { "branch": "master", "commit": "f3061339b8eaf9fda873600bc425b8d2d8502533" },
"nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" },
"nvim-web-devicons": { "branch": "master", "commit": "2ae6958df7ced50baac5035cec0c15799eedfbf7" },

View File

@@ -5,11 +5,13 @@ return {
-- │ Code parse │
{
"nvim-treesitter/nvim-treesitter",
branch = "main",
build = ":TSUpdate",
opts = function()
return require("plugins.opts.treesitter")
end,
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
require("nvim-treesitter.config").setup(opts)
end,
},

View File

@@ -35,7 +35,7 @@ local options = {
lualine_a = { "mode" },
lualine_b = { "branch", "diff" },
lualine_c = { "filename", "diagnostics" },
lualine_x = { "searchcount", "filetype", "encoding", "fileformat" },
lualine_x = { "lsp_status", "searchcount", "filetype", "encoding" },
lualine_y = { "progress" },
lualine_z = { "location" },
},

View File

@@ -36,26 +36,29 @@ local config = {
icon = "",
lang = "lua",
},
help = { pattern = "^:%s*he?l?p?%s+", icon = "" },
help = { pattern = "^:%s*he?l?p?%s+", icon = "" },
input = {}, -- Used by input()
-- lua = false, -- to disable a format, set to `false`
},
},
notify = {
-- Noice can be used as `vim.notify` so you can route any notification like other messages
-- Notification messages have their level and other properties set.
-- event is always "notify" and kind can be any log level as a string
-- The default routes will forward notifications to nvim-notify
-- Benefit of using Noice for this is the routing and consistent history view
enabled = false,
view = "notify",
},
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
},
-- Bottom right notifications with the lsp executions
progress = {
enabled = false,
--- @type NoiceFormat|string
format = "lsp_progress",
--- @type NoiceFormat|string
format_done = "lsp_progress_done",
throttle = 1000 / 30, -- frequency to update lsp progress message
view = "mini",
},
},
presets = {

View File

@@ -27,6 +27,7 @@ return {
for _, ext in ipairs(opts.extensions_list) do
telescope.load_extension(ext)
end
require("plugins.utils.telescope").setup()
end,
},
{ "mbbill/undotree" },

View File

@@ -0,0 +1,55 @@
local pickers = require("telescope.pickers")
local finders = require("telescope.finders")
local make_entry = require("telescope.make_entry")
local conf = require("telescope.config").values
local M = {}
local live_multigrep = function(opts)
opts = opts or {}
opts.cwd = opts.cwd or vim.uv.cwd()
local finder = finders.new_async_job({
command_generator = function(prompt)
if not prompt or prompt == "" then
return nil
end
local pieces = vim.split(prompt, " ")
local args = { "rg" }
if pieces[1] then
table.insert(args, "-e")
table.insert(args, pieces[1])
end
if pieces[2] then
table.insert(args, "-g")
table.insert(args, pieces[2])
end
---@diagnostic disable-next-line: deprecated
return vim.tbl_flatten({
args,
{ "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", "--smart-case" },
})
end,
entry_maker = make_entry.gen_from_vimgrep(opts),
cwd = opts.cwd,
})
pickers
.new(opts, {
debounce = 100,
prompt_title = "Multi Grep",
finder = finder,
previewer = conf.grep_previewer(opts),
sorter = require("telescope.sorters").empty(),
})
:find()
end
M.setup = function()
vim.keymap.set("n", "<leader>fW", live_multigrep)
end
return M