diff options
-rw-r--r-- | nvim/custom/configs/conform.lua | 32 | ||||
-rw-r--r-- | nvim/custom/plugins.lua | 20 | ||||
-rw-r--r-- | nvim/nvchad/lua/plugins/init.lua | 14 |
3 files changed, 34 insertions, 32 deletions
diff --git a/nvim/custom/configs/conform.lua b/nvim/custom/configs/conform.lua index 5edc9bf..0828666 100644 --- a/nvim/custom/configs/conform.lua +++ b/nvim/custom/configs/conform.lua @@ -1,16 +1,18 @@ require("conform").setup({ - formatters_by_ft = { - lua = { "stylua" }, - python = { "isort", "black" }, - javascript = { { "prettierd", "prettier" } }, - typescript = { { "prettierd", "prettier" } }, - javascriptreact = { { "prettierd", "prettier" } }, - html = { "prettierd", "prettier" }, - css = { "prettierd", "prettier" }, - }, - format_on_save = { - -- These options will be passed to conform.format() - timeout_ms = 500, - lsp_fallback = true, - }, - })
\ No newline at end of file + formatters_by_ft = { + lua = { "stylua" }, + python = { "isort", "black" }, + javascript = { { "prettierd", "prettier" } }, + typescript = { { "prettierd", "prettier" } }, + javascriptreact = { { "prettierd", "prettier" } }, + html = { "prettierd", "prettier" }, + css = { "prettierd", "prettier" }, + go = { "gofmt" }, + }, + format_on_save = { + -- These options will be passed to conform.format() + timeout_ms = 1500, + lsp_fallback = true, + }, +}) + diff --git a/nvim/custom/plugins.lua b/nvim/custom/plugins.lua index 8ad68d1..b958de2 100644 --- a/nvim/custom/plugins.lua +++ b/nvim/custom/plugins.lua @@ -1,20 +1,20 @@ local plugins = { { - "tpope/vim-fugitive", - lazy = false + "tpope/vim-fugitive", + lazy = false }, { - "stevearc/conform.nvim", - -- for users those who want auto-save conform + lazyloading! - -- event = "BufWritePre" - lazy = false, - config = function() - require "custom.configs.conform" - end, + "stevearc/conform.nvim", + -- for users those who want auto-save conform + lazyloading! + -- event = "BufWritePre" + lazy = false, + config = function() + require "custom.configs.conform" + end, }, { 'Exafunction/codeium.vim', - lazy=false + lazy = false } } return plugins diff --git a/nvim/nvchad/lua/plugins/init.lua b/nvim/nvchad/lua/plugins/init.lua index bce7140..fc653ae 100644 --- a/nvim/nvchad/lua/plugins/init.lua +++ b/nvim/nvchad/lua/plugins/init.lua @@ -70,7 +70,7 @@ local default_plugins = { { "nvim-treesitter/nvim-treesitter", event = { "BufReadPost", "BufNewFile" }, - tag = "v0.9.2", + -- tag = "v0.9.2", cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" }, build = ":TSUpdate", opts = function() @@ -176,12 +176,12 @@ local default_plugins = { { "numToStr/Comment.nvim", keys = { - { "gcc", mode = "n", desc = "Comment toggle current line" }, - { "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" }, - { "gc", mode = "x", desc = "Comment toggle linewise (visual)" }, - { "gbc", mode = "n", desc = "Comment toggle current block" }, - { "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" }, - { "gb", mode = "x", desc = "Comment toggle blockwise (visual)" }, + { "gcc", mode = "n", desc = "Comment toggle current line" }, + { "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" }, + { "gc", mode = "x", desc = "Comment toggle linewise (visual)" }, + { "gbc", mode = "n", desc = "Comment toggle current block" }, + { "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" }, + { "gb", mode = "x", desc = "Comment toggle blockwise (visual)" }, }, init = function() require("core.utils").load_mappings "comment" |