a lot of tweaks

This commit is contained in:
Florian Schmitt 2024-11-27 15:38:26 +03:00
parent ff6a56b52b
commit 789b096077
9 changed files with 133 additions and 39 deletions

View file

@ -4,12 +4,14 @@ local options = {
css = { "prettier" },
html = { "prettier" },
js = { "prettier" },
javascript = { "prettier" },
typescript = { "prettier" },
php = { "php_cs_fixer" },
python = { "black" },
},
format_on_save = {
timeout_ms = 500,
timeout_ms = 15000,
lsp_fallback = true,
},
}

View file

@ -45,6 +45,44 @@ return {
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
menu = {
width = vim.api.nvim_win_get_width(0) - 4,
},
settings = {
save_on_toggle = true,
},
},
keys = function()
local keys = {
{
"<leader>H",
function()
require("harpoon"):list():add()
end,
desc = "Harpoon File",
},
{
"<leader>h",
function()
local harpoon = require "harpoon"
harpoon.ui:toggle_quick_menu(harpoon:list())
end,
desc = "Harpoon Quick Menu",
},
}
for i = 1, 6 do
table.insert(keys, {
"<F" .. i .. ">",
function()
require("harpoon"):list():select(i)
end,
desc = "Harpoon to File " .. i,
})
end
return keys
end,
},
{
"nvim-treesitter/nvim-treesitter",
@ -64,6 +102,7 @@ return {
"php",
"python",
"rust",
"templ",
"toml",
"tsx",
"typescript",