You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
3.2 KiB
89 lines
3.2 KiB
local listchars = function() vim.opt.listchars:append "space:⋅" end
|
|
|
|
---@type LazySpec
|
|
return {
|
|
"AstroNvim/astrocore",
|
|
---@type AstroCoreOpts
|
|
opts = {
|
|
features = {
|
|
large_buf = { size = 1024 * 256, lines = 10000 }, -- set global limits for large files for disabling features like treesitter
|
|
autopairs = true, -- enable autopairs at start
|
|
cmp = true, -- enable completion at start
|
|
diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on)
|
|
highlighturl = true, -- highlight URLs at start
|
|
notifications = true, -- enable notifications at start
|
|
},
|
|
diagnostics = {
|
|
virtual_text = true,
|
|
underline = true,
|
|
},
|
|
options = {
|
|
opt = { -- vim.opt.<key>
|
|
relativenumber = true, -- sets vim.opt.relativenumber
|
|
number = true, -- sets vim.opt.number
|
|
spell = false, -- sets vim.opt.spell
|
|
signcolumn = "yes", -- sets vim.opt.signcolumn to yes
|
|
wrap = false, -- sets vim.opt.wrap
|
|
rnu = true,
|
|
autoindent = true,
|
|
list = true,
|
|
timeoutlen = 100,
|
|
updatetime = 50,
|
|
tabstop = 4,
|
|
softtabstop = 4,
|
|
shiftwidth = 4,
|
|
},
|
|
g = { -- vim.g.<key>
|
|
autoformat_enabled = true, -- enable or disable auto formatting at start (lsp.formatting.format_on_save must be enabled)
|
|
cmp_enabled = true, -- enable completion at start
|
|
autopairs_enabled = true, -- enable autopairs at start
|
|
diagnostics_mode = 3, -- set the visibility of diagnostics in the UI (0=off, 1=only show in status line, 2=virtual text off, 3=all on)
|
|
icons_enabled = true, -- disable icons in the UI (disable if no nerd font is available, requires :PackerSync after changing)
|
|
ui_notifications_enabled = true, -- disable notifications when toggling UI elements
|
|
},
|
|
listchars(), -- comment this line if you don't want to render dots for empty spaces
|
|
},
|
|
mappings = {
|
|
-- first key is the mode
|
|
n = {
|
|
-- navigate buffer tabs
|
|
["]b"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
|
|
["[b"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
|
|
["<Leader>bd"] = {
|
|
function()
|
|
require("astroui.status.heirline").buffer_picker(
|
|
function(bufnr) require("astrocore.buffer").close(bufnr) end
|
|
)
|
|
end,
|
|
desc = "Close buffer from tabline",
|
|
},
|
|
|
|
},
|
|
},
|
|
autocmds = {
|
|
set_templ_to_format = {
|
|
{
|
|
event = { "BufEnter" },
|
|
desc = "Set templ filetype to format",
|
|
pattern = "*.templ",
|
|
callback = function() vim.bo.filetype = "templ" end,
|
|
},
|
|
},
|
|
set_html_to_format = {
|
|
{
|
|
event = { "BufReadPost" },
|
|
desc = "Set html filetype to htmldjango format",
|
|
pattern = "*.html",
|
|
callback = function() vim.bo.filetype = "htmldjango" end,
|
|
},
|
|
},
|
|
highlight_yank = {
|
|
{
|
|
event = { "TextYankPost" },
|
|
desc = "Highlight on yank",
|
|
callback = function() vim.highlight.on_yank() end,
|
|
}
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|