neovim

mrgrouse's beloved, handmade neovim configuration
Log | Files | Refs | README

commit c2b39856381a02998eb665d0718e51fba6392d9e
parent 83ac6a85bb8a9e8574e9444387f3196151c76be9
Author: mrgrouse <bdmfegys@duck.com>
Date:   Wed,  2 Jul 2025 06:50:51 -0400

Merge branch 'implement-formatting'

Diffstat:
Mlua/plugins/conform.lua | 43++++++++++++++-----------------------------
Mlua/plugins/mason.lua | 33+++++++++++++++------------------
Dlua/plugins/mini-pairs.lua | 9---------
Alua/plugins/mini.lua | 9+++++++++
Mlua/plugins/whichkey.lua | 3++-
5 files changed, 40 insertions(+), 57 deletions(-)

diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua @@ -1,31 +1,16 @@ return { - "stevearc/conform.nvim", - --event = { "BufReadPre", "BufNewFile" }, - config = function() - local conform = require("conform") - - conform.setup({ - formatters_by_ft = { - json = { "prettier" }, - yaml = { "prettier" }, - markdown = { "prettier" }, - css = { "ast-grep" }, - html = { "ast-grep" }, - c = { "ast-grep" }, - --c++ = { "ast-grep" }, - --c# = { "ast-grep" }, - rust = { "ast-grep" }, - go = { "ast-grep" }, - java = { "ast-grep" }, - javascript = { "ast-grep" }, - python = { "ast-grep" }, - lua = { "ast-grep" }, - }, - --format_on_save = { - -- lsp_fallback = true, - -- async = false, - -- timeout_ms = 500, - --}, - }) - end, + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + lua = {"lua-format"}, + c = {"clang-format"}, + c_sharp = {"clang-format"}, + -- c++ = {"clang-format"}, + json = {"clang-format"}, + javascript = {"clang-format"}, + markdown = {"prettier"}, + html = {"prettier"}, + css = {"prettier"} + } + } } diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua @@ -1,21 +1,18 @@ return { - "williamboman/mason.nvim", - dependencies = { - "williamboman/mason-lspconfig.nvim", - }, - config = function() - -- import mason - local mason = require("mason") + "williamboman/mason.nvim", + config = function() + -- import mason + local mason = require("mason") - -- enable mason and configure icons - mason.setup({ - ui = { - icons = { - package_installed = "✓", - package_pending = "➜", - package_uninstalled = "✗", - }, - }, - }) - end, + -- enable mason and configure icons + mason.setup({ + ui = { + icons = { + package_installed = "✓", + package_pending = "➜", + package_uninstalled = "✗", + }, + }, + }) + end, } diff --git a/lua/plugins/mini-pairs.lua b/lua/plugins/mini-pairs.lua @@ -1,9 +0,0 @@ -return { - "echasnovski/mini.pairs", - event = "VeryLazy", - opts = { - mappings = { - ["`"] = { action = "closeopen", pair = "``", neigh_pattern = "[^\\`].", register = { cr = false } }, - }, - }, - } diff --git a/lua/plugins/mini.lua b/lua/plugins/mini.lua @@ -0,0 +1,9 @@ +return { + "echasnovski/mini.pairs", + event = "VeryLazy", + opts = { + mappings = { + ["`"] = { action = "closeopen", pair = "``", neigh_pattern = "[^\\`].", register = { cr = false } }, + }, + }, +} diff --git a/lua/plugins/whichkey.lua b/lua/plugins/whichkey.lua @@ -17,7 +17,8 @@ return { { "<leader>f", function() - require("conform").format({ lsp_fallback = true, async = false, timeout_ms = 500 }) + require("conform").setup() + require("conform").format() end, desc = "Format Buffer", },