working?
This commit is contained in:
parent
83f02dbde7
commit
5bdc9a9944
1
init.lua
1
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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
{ "mason-org/mason.nvim", version = "^1.0.0" },
|
||||
{ "mason-org/mason-lspconfig.nvim", version = "^1.0.0" },
|
||||
}
|
||||
|
|
@ -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" },
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ return {
|
|||
'eslint_d', -- ts/js linter
|
||||
'shfmt',
|
||||
'ruff',
|
||||
'goimports'
|
||||
},
|
||||
-- auto-install configured formatters & linters (with null-ls)
|
||||
automatic_installation = true,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
{
|
||||
"tpope/vim-unimpaired",
|
||||
lazy = false, -- Load immediately since it provides useful mappings
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue