The oxlint LSP now enables type-aware linting on its own when tsgolint is present and .oxlintrc.json mentions typescript, and ships :LspOxlintFixAll -- which is what the oxlint_fix function reimplemented by shelling out to the CLI. The extra also sets fixKind = "all" and prefers the top-level oxlint config in monorepos. Fixes now apply as a workspace edit instead of writing to disk and reloading. oxfmt takes js/ts/json/vue over prettier; prettier keeps css/html/yaml/markdown. Add oxlint to mason so it resolves outside projects with a local install. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
38 lines
1.5 KiB
Lua
38 lines
1.5 KiB
Lua
-- Keymaps are automatically loaded on the VeryLazy event
|
|
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
|
-- Add any additional keymaps here
|
|
|
|
vim.keymap.set("n", "<leader>H", function()
|
|
Snacks.terminal({ "clx" })
|
|
end, { desc = "Toggle clx (console HackerNews) floating terminal" })
|
|
|
|
vim.keymap.set("n", "<leader>dd", function()
|
|
Snacks.terminal({ "lazydocker" }, { esc_esc = false, ctrl_hjkl = false })
|
|
end, { desc = "Toggle lazydocker (console Docker Desktop) floating terminal" })
|
|
|
|
vim.keymap.set("n", "<leader>B", function()
|
|
Snacks.terminal({ "btop" }, { esc_esc = false, ctrl_hjkl = false })
|
|
end, { desc = "Toggle btop (improved console top monitor) floating terminal" })
|
|
|
|
local function toggle_split_terminal()
|
|
Snacks.terminal.toggle(nil, { win = { position = "bottom" } })
|
|
end
|
|
|
|
vim.keymap.set({ "n", "t" }, [[<C-\>]], toggle_split_terminal, { desc = "Toggle terminal split" })
|
|
vim.keymap.set({ "n", "t" }, "<F12>", toggle_split_terminal, { desc = "Toggle terminal split" })
|
|
|
|
-- Toggle zoom/maximize current window (<C-w> is the vim window prefix, m for maximize)
|
|
vim.keymap.set({ "n", "t" }, "<C-w>m", function()
|
|
Snacks.toggle.zoom():toggle()
|
|
end, { desc = "Toggle Zoom" })
|
|
|
|
-- Allow Cmd+V pasting on mac
|
|
if vim.fn.has("mac") == 1 then
|
|
vim.keymap.set("n", "<D-v>", '"+p')
|
|
vim.keymap.set("n", "<D-s-v>", '"+p')
|
|
vim.keymap.set("i", "<D-v>", "<C-r>*")
|
|
vim.keymap.set("i", "<D-s-v>", "<C-r>*")
|
|
vim.keymap.set("t", "<D-v>", '<C-\\><C-n>"+pi')
|
|
vim.keymap.set("t", "<D-s-v>", '<C-\\><C-n>"+pi')
|
|
end
|