Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
imforster committed Jan 20, 2025
1 parent 0c4fc9c commit 1878865
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 5 deletions.
7 changes: 4 additions & 3 deletions lazyvim.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"lazyvim.plugins.extras.lang.yaml"
],
"news": {
"NEWS.md": "6077"
"NEWS.md": "10960"
},
"version": 6
}
"version": 7
}

38 changes: 38 additions & 0 deletions lua/iforster/plugins/formatting.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
return {
"stevearc/conform.nvim",
event = { "BufReadPre", "BufNewFile" },
config = function()
local conform = require("conform")

conform.setup({
formatters_by_ft = {
javascript = { "prettier" },
typescript = { "prettier" },
javascriptreact = { "prettier" },
typescriptreact = { "prettier" },
svelte = { "prettier" },
css = { "prettier" },
html = { "prettier" },
json = { "prettier" },
yaml = { "prettier" },
markdown = { "prettier" },
graphql = { "prettier" },
lua = { "stylua" },
python = { "isort", "black" },
},
format_on_save = {
lsp_fallback = true,
async = false,
timeout_ms = 500,
},
})

vim.keymap.set({ "n", "v" }, "<leader>mp", function()
conform.format({
lsp_fallback = true,
async = false,
timeout_ms = 500,
})
end, { desc = "Format file or range (in visual mode)" })
end,
}
4 changes: 2 additions & 2 deletions lua/iforster/plugins/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ return {
["<C-k>"] = actions.move_selection_previous, -- move to prev result
["<C-j>"] = actions.move_selection_next, -- move to next result
["<C-q>"] = actions.send_selected_to_qflist + custom_actions.open_trouble_qflist,
["<C-t>"] = trouble_telescope.smart,
["<C-t>"] = trouble_telescope.open,
},
},
},
})

telescope.load_extension("fzf")
-- telescope.load_extension("fzf")

-- set keymaps
local keymap = vim.keymap -- for conciseness
Expand Down

0 comments on commit 1878865

Please sign in to comment.