Huge configs updates
This commit is contained in:
@ -18,18 +18,22 @@ return {
|
||||
-- Define your formatters
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
python = { "ruff_organize_imports_only" },
|
||||
javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
sh = { "shfmt" },
|
||||
python = { "ruff_organize_imports_only" },
|
||||
go = { "goimports", "gofmt" },
|
||||
html = { "prettierd", "prettier", stop_after_first = true },
|
||||
css = { "prettierd", "prettier", stop_after_first = true },
|
||||
javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
typescript = { "prettierd", "prettier", stop_after_first = true },
|
||||
json = { "prettierd", "prettier", stop_after_first = true },
|
||||
jsonc = { "prettierd", "prettier", stop_after_first = true },
|
||||
css = { "prettierd", "prettier", stop_after_first = true },
|
||||
html = { "prettierd", "prettier", stop_after_first = true },
|
||||
-- go = { "goimports", "gofmt" },
|
||||
-- typescript = { "prettierd", "prettier", stop_after_first = true },
|
||||
markdown = { "prettierd", "prettier", stop_after_first = true },
|
||||
},
|
||||
-- Custom formatters
|
||||
formatters = {
|
||||
prettierd = {
|
||||
args = { "--tab-width", "2" },
|
||||
},
|
||||
ruff_organize_imports_only = {
|
||||
command = "ruff",
|
||||
args = {
|
||||
|
||||
@ -1,19 +1,56 @@
|
||||
function number_switch(harpoon)
|
||||
for i = 1, 9, 1 do
|
||||
vim.keymap.set("n", "<leader>" .. i, function()
|
||||
harpoon:list():select(i)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
|
||||
opts = {
|
||||
settings = {
|
||||
save_on_toggle = false,
|
||||
save_on_change = true,
|
||||
excluded_filetypes = { "harpoon" },
|
||||
},
|
||||
menu = {
|
||||
width = vim.api.nvim_win_get_width(0) - 4,
|
||||
},
|
||||
},
|
||||
|
||||
config = function()
|
||||
-- local harpoon = require("harpoon")
|
||||
-- harpoon.setup({
|
||||
-- save_on_toggle = false,
|
||||
-- save_on_change = true,
|
||||
-- enter_on_sendcmd = false,
|
||||
-- tmux_autoclose_windows = false,
|
||||
-- excluded_filetypes = { "harpoon" },
|
||||
-- mark_branch = false,
|
||||
-- })
|
||||
-- require("harpoon"):setup()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon:setup()
|
||||
|
||||
local harpoon_extensions = require("harpoon.extensions")
|
||||
harpoon:extend(harpoon_extensions.builtins.highlight_current_file())
|
||||
|
||||
vim.keymap.set("n", "<leader>h", function()
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>H", function()
|
||||
harpoon:list():add()
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>l", function()
|
||||
harpoon:list():remove()
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>L", function()
|
||||
harpoon:list():clear()
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<M-h>", function()
|
||||
harpoon:list():prev()
|
||||
end)
|
||||
vim.keymap.set("n", "<M-l>", function()
|
||||
harpoon:list():next()
|
||||
end)
|
||||
|
||||
number_switch(harpoon)
|
||||
end,
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ return {
|
||||
python = { pythonPath = python_path },
|
||||
basedpyright = {
|
||||
analysis = {
|
||||
typeCheckingMode = "strict",
|
||||
typeCheckingMode = "standard",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user