From 5bdc9a9944b3e63e8dad5ce8f7806e85cbee0974 Mon Sep 17 00:00:00 2001 From: Walter Jenkins Date: Tue, 12 Aug 2025 23:10:09 -0500 Subject: [PATCH] working? --- init.lua | 1 + lua/core/options.lua | 12 ++++++++++-- lua/core/ui.lua | 7 +++---- lua/plugins/aaa.lua | 4 ++++ lua/plugins/conform.lua | 8 ++++++-- lua/plugins/none-ls.lua | 1 + lua/plugins/unimpaired.lua | 6 ++++++ 7 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 lua/plugins/aaa.lua create mode 100644 lua/plugins/unimpaired.lua diff --git a/init.lua b/init.lua index d80bb7d9..1cfb0a54 100644 --- a/init.lua +++ b/init.lua @@ -60,6 +60,7 @@ require('lazy').setup({ require 'plugins.treesitter', require 'plugins.vim-tmux-navigator', require 'plugins.zellij', + }, { ui = { -- If you have a Nerd Font, set icons to an empty table which will use the diff --git a/lua/core/options.lua b/lua/core/options.lua index 07e6380a..07ceb0b5 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -24,7 +24,7 @@ vim.o.shiftwidth = 4 -- the number of spaces ins vim.o.tabstop = 2 -- insert n spaces for a tab vim.o.softtabstop = 4 -- Number of spaces that a tab counts for while performing editing operations vim.o.expandtab = true -- convert tabs to spaces -vim.o.cursorline = true -- highlight the current line +vim.o.cursorline = true -- highlight the current line vim.o.splitbelow = true -- force all horizontal splits to go below current window vim.o.splitright = true -- force all vertical splits to go to the right of current window vim.o.swapfile = false -- creates a swapfile @@ -60,4 +60,12 @@ vim.opt.foldlevel = 99 -- Keep folds open by default - +vim.api.nvim_create_autocmd("FileType", { + pattern = "templ", + callback = function() + vim.bo.tabstop = 2 + vim.bo.shiftwidth = 2 + vim.bo.softtabstop = 2 + vim.bo.expandtab = true + end, +}) diff --git a/lua/core/ui.lua b/lua/core/ui.lua index d2a1d197..d6131d67 100644 --- a/lua/core/ui.lua +++ b/lua/core/ui.lua @@ -32,7 +32,6 @@ return { event = 'VimEnter', opts = function(_, opts) local logo = [[ - ████████ ████████ ██ ██ ██ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▒▒▒▒ ████ @@ -46,14 +45,14 @@ return { ████ ████ ██ ████ ████ ████ ████ ████ ████ ██████████ ██████████ - ]] - logo = string.rep('\n', 8) .. logo .. '\n\n' - -- 🔥 Ensure `opts.config` is a table before modifying opts.config = opts.config or {} opts.config.header = vim.split(logo, '\n') + + -- ✅ Disable project module to avoid error + opts.config.project = { enable = false } end, }, } diff --git a/lua/plugins/aaa.lua b/lua/plugins/aaa.lua new file mode 100644 index 00000000..949039d2 --- /dev/null +++ b/lua/plugins/aaa.lua @@ -0,0 +1,4 @@ +return { + { "mason-org/mason.nvim", version = "^1.0.0" }, + { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" }, +} diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index 25327e3a..a538f2c3 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -4,7 +4,11 @@ return { config = function() require("conform").setup({ formatters_by_ft = { - templ = { "templ", "prettier" }, -- Use templ first, then Prettier for embedded content + -- Disable formatters for .templ files + templ = {}, + + -- Add your other filetype configs here as needed + -- e.g., go = { "gofmt" }, }, format_on_save = { timeout_ms = 500, @@ -12,6 +16,6 @@ return { }, }) end, - event = { "BufReadPre", "BufNewFile" }, -- Load only when opening a file + event = { "BufReadPre", "BufNewFile" }, } } diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua index 73e42ddf..fc4ee0ce 100644 --- a/lua/plugins/none-ls.lua +++ b/lua/plugins/none-ls.lua @@ -19,6 +19,7 @@ return { 'eslint_d', -- ts/js linter 'shfmt', 'ruff', + 'goimports' }, -- auto-install configured formatters & linters (with null-ls) automatic_installation = true, diff --git a/lua/plugins/unimpaired.lua b/lua/plugins/unimpaired.lua new file mode 100644 index 00000000..89ece6ba --- /dev/null +++ b/lua/plugins/unimpaired.lua @@ -0,0 +1,6 @@ +return { + { + "tpope/vim-unimpaired", + lazy = false, -- Load immediately since it provides useful mappings + } +}