Compare commits

...

2 Commits

Author SHA1 Message Date
200f428b3c Update config to astronvim V6 2026-05-05 21:55:42 -03:00
5c7bbd33cd Fix the config and add C# lsp 2026-05-04 18:36:35 -03:00
22 changed files with 258 additions and 493 deletions

2
.gitignore vendored
View File

@@ -1 +1 @@
lazy-lock.json *.json

View File

@@ -1,10 +1,18 @@
-- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution -- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution
-- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk. -- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk.
local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim" local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then
-- stylua: ignore -- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) local result = vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
if vim.v.shell_error ~= 0 then
-- stylua: ignore
vim.api.nvim_echo({ { ("Error cloning lazy.nvim:\n%s\n"):format(result), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
vim.fn.getchar()
vim.cmd.quit()
end
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
-- validate that lazy is available -- validate that lazy is available

View File

@@ -1,19 +1,26 @@
-- AstroCommunity: import any community modules here
-- We import this file in `lazy_setup.lua` before the `plugins/` folder.
-- This guarantees that the specs are processed before any user plugins.
---@type LazySpec
return { return {
"AstroNvim/astrocommunity", "AstroNvim/astrocommunity",
{ import = "astrocommunity.pack.lua" },
-- { import = "astrocommunity.colorscheme.catppuccin" }, -- import/override with your plugins folder
-- { { import = "astrocommunity.colorscheme.catppuccin" },
-- "catppuccin", {
-- opts = { "catppuccin",
-- integrations = { opts = {
-- ts_rainbow2 = true, integrations = {
-- treesitter = true, ts_rainbow2 = true,
-- } treesitter = true,
-- }, },
transparent_background = true
},
-- config = function() -- config = function()
-- vim.api.nvim_set_hl(0, "LspInlayHint", { bg = "#1e1e2f" }) -- vim.api.nvim_set_hl(0, "LspInlayHint", { bg = "#1e1e2f" })
-- end -- end
-- }, },
-- { import = "astrocommunity.pack.cpp" }, -- { import = "astrocommunity.pack.cpp" },
@@ -25,13 +32,15 @@ return {
{ import = "astrocommunity.quickfix.nvim-bqf" }, { import = "astrocommunity.quickfix.nvim-bqf" },
{ import = "astrocommunity.markdown-and-latex.vimtex" },
-- { import = "astrocommunity.diagnostics.lsp_lines-nvim" }, -- { import = "astrocommunity.diagnostics.lsp_lines-nvim" },
-- { import = "astrocommunity.diagnostics.trouble-nvim" }, -- { import = "astrocommunity.diagnostics.trouble-nvim" },
{ import = "astrocommunity.editing-support.rainbow-delimiters-nvim" }, { import = "astrocommunity.editing-support.rainbow-delimiters-nvim" },
{ import = "astrocommunity.editing-support.ultimate-autopair-nvim" }, -- { import = "astrocommunity.editing-support.ultimate-autopair-nvim" },
{ import = "astrocommunity.indent.mini-indentscope" }, { import = "astrocommunity.indent.mini-indentscope" },

View File

@@ -1,94 +0,0 @@
return {
-- Configure AstroNvim updates
updater = {
remote = "origin", -- remote to use
channel = "stable", -- "stable" or "nightly"
version = "latest", -- "latest", tag name, or regex search like "v1.*" to only do updates before v2 (STABLE ONLY)
branch = "nightly", -- branch name (NIGHTLY ONLY)
commit = nil, -- commit hash (NIGHTLY ONLY)
pin_plugins = nil, -- nil, true, false (nil will pin plugins on stable only)
skip_prompts = false, -- skip prompts about breaking changes
show_changelog = true, -- show the changelog after performing an update
auto_quit = false, -- automatically quit the current session after a successful update
remotes = { -- easily add new remotes to track
-- ["remote_name"] = "https://remote_url.come/repo.git", -- full remote url
-- ["remote2"] = "github_user/repo", -- GitHub user/repo shortcut,
-- ["remote3"] = "github_user", -- GitHub user assume AstroNvim fork
},
},
-- Configure require("lazy").setup() options
lazy = {
defaults = { lazy = true },
performance = {
rtp = {
-- customize default disabled vim plugins
disabled_plugins = { "tohtml", "gzip", "matchit", "zipPlugin", "netrwPlugin", "tarPlugin" },
},
},
},
-- This function is run last and is a good place to configuring
-- augroups/autocommands and custom filetypes also this just pure lua so
-- anything that doesn't fit in the normal config locations above can go here
polish = function()
-- Set up custom filetypes
-- vim.filetype.add {
-- extension = {
-- foo = "fooscript",
-- },
-- filename = {
-- ["Foofile"] = "fooscript",
-- },
-- pattern = {
-- ["~/%.config/foo/.*"] = "fooscript",
-- },
-- }
vim.filetype.add {
extension = {
asm = "nasm",
},
}
require("catppuccin").compile()
vim.api.nvim_create_autocmd({ "VimEnter" }, {
command = [[ let $SHELL="/bin/fish" ]]
})
vim.api.nvim_create_autocmd({ "FileType", "BufRead", "BufNewFile" }, {
pattern = "*.s",
callback = function()
local indentation = 8
vim.opt_local.expandtab = true
vim.opt_local.tabstop = indentation
vim.opt_local.shiftwidth = indentation
vim.opt_local.filetype = "s-asm"
vim.opt_local.syntax = "s-asm"
vim.opt_local.formatoptions = vim.opt_local.formatoptions + "r"
end,
})
vim.api.nvim_create_autocmd({ "FileType", "BufRead", "BufNewFile" }, {
pattern = "*.hdl",
callback = function()
local indentation = 4
vim.opt_local.expandtab = true
vim.opt_local.tabstop = indentation
vim.opt_local.shiftwidth = indentation
vim.opt_local.formatoptions = vim.opt_local.formatoptions + "r"
end,
})
vim.api.nvim_create_autocmd({ "FileType", "BufRead", "BufNewFile" }, {
pattern = "*.lua",
callback = function()
local indentation = 4
vim.opt_local.expandtab = true
vim.opt_local.tabstop = indentation
vim.opt_local.shiftwidth = indentation
end,
})
end,
}

View File

@@ -1,7 +1,7 @@
require("lazy").setup({ require("lazy").setup({
{ {
"AstroNvim/AstroNvim", "AstroNvim/AstroNvim",
version = "^4", -- Remove version tracking to elect for nighly AstroNvim version = "^6", -- Remove version tracking to elect for nightly AstroNvim
import = "astronvim.plugins", import = "astronvim.plugins",
opts = { -- AstroNvim options must be set here with the `import` key opts = { -- AstroNvim options must be set here with the `import` key
mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
@@ -15,7 +15,7 @@ require("lazy").setup({
{ import = "plugins" }, { import = "plugins" },
} --[[@as LazySpec]], { } --[[@as LazySpec]], {
-- Configure any other `lazy.nvim` configuration options here -- Configure any other `lazy.nvim` configuration options here
install = { colorscheme = { "astrodark", "habamax" } }, install = { colorscheme = { "astrotheme", "habamax" } },
ui = { backdrop = 100 }, ui = { backdrop = 100 },
performance = { performance = {
rtp = { rtp = {

View File

@@ -10,21 +10,12 @@ return {
"AstroNvim/astrocore", "AstroNvim/astrocore",
---@type AstroCoreOpts ---@type AstroCoreOpts
opts = { opts = {
sessions = {
autosave = {
last = true,
cwd = true,
},
ignore = {
dirs = { "wiki" },
},
},
-- Configure core features of AstroNvim -- Configure core features of AstroNvim
features = { features = {
large_buf = { size = 1024 * 500, lines = 10000 }, -- set global limits for large files for disabling features like treesitter large_buf = { size = 1024 * 256, lines = 10000 }, -- set global limits for large files for disabling features like treesitter
autopairs = true, -- enable autopairs at start autopairs = false, -- enable autopairs at start
cmp = true, -- enable completion 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) diagnostics = { virtual_text = true, virtual_lines = false }, -- diagnostic settings on startup
highlighturl = true, -- highlight URLs at start highlighturl = true, -- highlight URLs at start
notifications = true, -- enable notifications at start notifications = true, -- enable notifications at start
}, },
@@ -33,13 +24,26 @@ return {
virtual_text = true, virtual_text = true,
underline = true, underline = true,
}, },
-- passed to `vim.filetype.add`
filetypes = {
-- see `:h vim.filetype.add` for usage
extension = {
foo = "fooscript",
},
filename = {
[".foorc"] = "fooscript",
},
pattern = {
[".*/etc/foo/.*"] = "fooscript",
},
},
-- vim options can be configured here -- vim options can be configured here
options = { options = {
opt = { -- vim.opt.<key> opt = { -- vim.opt.<key>
relativenumber = true, -- sets vim.opt.relativenumber relativenumber = true, -- sets vim.opt.relativenumber
number = true, -- sets vim.opt.number number = true, -- sets vim.opt.number
spell = false, -- sets vim.opt.spell spell = false, -- sets vim.opt.spell
signcolumn = "auto", -- sets vim.opt.signcolumn to auto signcolumn = "yes", -- sets vim.opt.signcolumn to yes
wrap = false, -- sets vim.opt.wrap wrap = false, -- sets vim.opt.wrap
expandtab = false, expandtab = false,
cursorline = false, cursorline = false,
@@ -54,13 +58,19 @@ return {
-- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup` -- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup`
-- This can be found in the `lua/lazy_setup.lua` file -- This can be found in the `lua/lazy_setup.lua` file
mapleader = " ", -- sets vim.g.mapleader mapleader = " ", -- sets vim.g.mapleader
autoformat_enabled = false, -- enable or disable auto formatting at start (lsp.formatting.format_on_save must be enabled)
cmp_enabled = true, -- enable completion at start 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) 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) icons_enabled = true, -- disable icons in the UI (disable if no nerd font is available, requires :PackerSync after changing)
autoformat_enabled = false, -- enable or disable auto formatting at start (lsp.formatting.format_on_save must be enabled)
autopairs_enabled = false, -- enable autopairs at start
ui_notifications_enabled = true, -- disable notifications when toggling UI elements ui_notifications_enabled = true, -- disable notifications when toggling UI elements
c_syntax_for_h = 1, c_syntax_for_h = 1,
-- Vimtex
vimtex_view_method = "zathura",
vimtex_compiler_latexmk = {
aux_dir = "/run/user/1000/vimtex-aux"
},
-- Wiki
wiki_root = '~/Documentos/Wiki', wiki_root = '~/Documentos/Wiki',
wiki_journal = { wiki_journal = {
name = "journal", name = "journal",
@@ -84,6 +94,26 @@ return {
n = { n = {
-- second key is the lefthand side of the map -- second key is the lefthand side of the map
-- 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" },
-- mappings seen under group name "Buffer"
["<Leader>bd"] = {
function()
require("astroui.status.heirline").buffer_picker(
function(bufnr) require("astrocore.buffer").close(bufnr) end
)
end,
desc = "Close buffer from tabline",
},
-- tables with just a `desc` key will be registered with which-key if it's installed
-- this is useful for naming menus
-- ["<Leader>b"] = { desc = "Buffers" },
-- setting a mapping to false will disable it
-- ["<C-S>"] = false,
-- navigate buffer tabs with `H` and `L` -- navigate buffer tabs with `H` and `L`
L = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" }, L = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
H = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" }, H = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
@@ -148,8 +178,6 @@ return {
["<Leader>b"] = { desc = "Buffers" }, ["<Leader>b"] = { desc = "Buffers" },
-- quick save -- quick save
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command -- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
n = { utils.better_search "n", desc = "Next search" },
N = { utils.better_search "N", desc = "Previous search" },
["<Up>"] = { function() require("smart-splits").resize_up(2) end, desc = "Resize split up" }, ["<Up>"] = { function() require("smart-splits").resize_up(2) end, desc = "Resize split up" },
["<Down>"] = { function() require("smart-splits").resize_down(2) end, desc = "Resize split down" }, ["<Down>"] = { function() require("smart-splits").resize_down(2) end, desc = "Resize split down" },
["<Left>"] = { function() require("smart-splits").resize_left(2) end, desc = "Resize split left" }, ["<Left>"] = { function() require("smart-splits").resize_left(2) end, desc = "Resize split left" },
@@ -284,26 +312,6 @@ return {
["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
["<C-l>"] = { function() require("luasnip").jump(1) end, desc = "Jump to next snippet" }, ["<C-l>"] = { function() require("luasnip").jump(1) end, desc = "Jump to next snippet" },
}, },
v = {
["<Leader>s"] = { function() require("spectre").open_visual() end, desc = "Spectre" },
},
t = {
-- setting a mapping to false will disable it
-- ["<esc>"] = false,
},
x = {
-- better increment/decrement
["+"] = { "g<C-a>", desc = "Increment number" },
["-"] = { "g<C-x>", desc = "Descrement number" },
-- Easy-Align
ga = { "<Plug>(EasyAlign)", desc = "Easy Align" },
},
o = {
-- line text-objects
["il"] = { ":normal vil<cr>", desc = "Inside line text object" },
["al"] = { ":normal val<cr>", desc = "Around line text object" },
},
}, },
}, },
} }

View File

@@ -10,9 +10,8 @@ return {
opts = { opts = {
-- Configuration table of features provided by AstroLSP -- Configuration table of features provided by AstroLSP
features = { features = {
autoformat = true, -- enable or disable auto formatting on start
codelens = true, -- enable/disable codelens refresh on start codelens = true, -- enable/disable codelens refresh on start
-- inlay_hints = true, -- enable/disable inlay hints on start inlay_hints = false, -- enable/disable inlay hints on start
semantic_tokens = true, -- enable/disable semantic token highlighting semantic_tokens = true, -- enable/disable semantic token highlighting
}, },
-- customize lsp formatting options -- customize lsp formatting options
@@ -29,7 +28,7 @@ return {
}, },
disabled = { -- disable formatting capabilities for the listed language servers disabled = { -- disable formatting capabilities for the listed language servers
-- disable lua_ls formatting capability if you want to use StyLua to format your lua code -- disable lua_ls formatting capability if you want to use StyLua to format your lua code
"lua_ls", -- "lua_ls",
}, },
timeout_ms = 1000, -- default format timeout timeout_ms = 1000, -- default format timeout
-- filter = function(client) -- fully override the default formatting function -- filter = function(client) -- fully override the default formatting function
@@ -39,12 +38,13 @@ return {
-- enable servers that you already have installed without mason -- enable servers that you already have installed without mason
servers = { servers = {
-- "pyright" -- "pyright"
"clangd", "clangd"
}, },
-- customize language server configuration options passed to `lspconfig` -- customize language server configuration passed to `vim.lsp.config`
-- client specific configuration can also go in `lsp/` in your configuration root (see `:h lsp-config`)
---@diagnostic disable: missing-fields ---@diagnostic disable: missing-fields
config = { config = {
-- clangd = { capabilities = { offsetEncoding = "utf-8" } }, -- ["*"] = { capabilities = {} }, -- modify default LSP client settings such as capabilities
clangd = { clangd = {
cmd = { cmd = {
"clangd", "clangd",
@@ -63,76 +63,65 @@ return {
dataSourceName = "host=127.0.0.1 port=5432 user=postgres password=postgres dbname=trabalho sslmode=disable" dataSourceName = "host=127.0.0.1 port=5432 user=postgres password=postgres dbname=trabalho sslmode=disable"
} }
}, },
root_dir = function(path) root_markers = {".git"},
-- local normal = require("lspconfig.util").root_pattern(".git")(vim.fn.getcwd()) single_file_support = true,
-- local normal = require("lspconfig.util").root_pattern(".git")(vim.fn.getcwd())
local normal = vim.fs.root(vim.fn.getcwd(), { '.git' })
if normal then
return normal
else
return vim.fn.getcwd()
end
end,
filetypes = { "cpp", "c" }, filetypes = { "cpp", "c" },
capabilities = { capabilities = {
offsetEncoding = "utf-8", offsetEncoding = "utf-8",
} },
} },
}, },
-- customize how language servers are attached -- customize how language servers are attached
handlers = { handlers = {
-- a function without a key is simply the default handler, functions take two parameters, the server name and the configured options table for that server -- a function with the key `*` modifies the default handler, functions takes the server name as the parameter
-- function(server, opts) require("lspconfig")[server].setup(opts) end -- ["*"] = function(server) vim.lsp.enable(server) end
-- the key is the server that is being setup with `lspconfig` -- the key is the server that is being setup with `vim.lsp.config`
-- rust_analyzer = false, -- setting a handler to false will disable the set up of that language server -- rust_analyzer = false, -- setting a handler to false will disable the set up of that language server
-- pyright = function(_, opts) require("lspconfig").pyright.setup(opts) end -- or a custom handler function can be passed
-- clangd = function(_, opts) require("clangd_extensions").setup { server = opts } end,
}, },
-- Configure buffer local auto commands to add when attaching a language server -- Configure buffer local auto commands to add when attaching a language server
autocmds = { autocmds = {
-- first key is the `augroup` to add the auto commands to (:h augroup) -- first key is the `augroup` to add the auto commands to (:h augroup)
lsp_document_highlight = { lsp_codelens_refresh = {
-- Optional condition to create/delete auto command group -- Optional condition to create/delete auto command group
-- can either be a string of a client capability or a function of `fun(client, bufnr): boolean` -- can either be a string of a client capability or a function of `fun(client, bufnr): boolean`
-- condition will be resolved for each client on each execution and if it ever fails for all clients, -- condition will be resolved for each client on each execution and if it ever fails for all clients,
-- the auto commands will be deleted for that buffer -- the auto commands will be deleted for that buffer
cond = "textDocument/documentHighlight", cond = "textDocument/codeLens",
-- cond = function(client, bufnr) return client.name == "lua_ls" end, -- cond = function(client, bufnr) return client.name == "lua_ls" end,
-- list of auto commands to set -- list of auto commands to set
{ {
-- events to trigger -- events to trigger
event = { "CursorHold", "CursorHoldI" }, event = { "InsertLeave", "BufEnter" },
-- the rest of the autocmd options (:h nvim_create_autocmd) -- the rest of the autocmd options (:h nvim_create_autocmd)
desc = "Document Highlighting", desc = "Refresh codelens (buffer)",
callback = function() vim.lsp.buf.document_highlight() end, callback = function(args)
}, if require("astrolsp").config.features.codelens then vim.lsp.codelens.enable(true, { bufnr = args.buf }) end
{ end,
event = { "CursorMoved", "CursorMovedI", "BufLeave" },
desc = "Document Highlighting Clear",
callback = function() vim.lsp.buf.clear_references() end,
}, },
}, },
}, },
-- mappings to be set up on attaching of a language server -- mappings to be set up on attaching of a language server
mappings = { mappings = {
n = { n = {
gl = { function() vim.diagnostic.open_float() end, desc = "Hover diagnostics" },
-- a `cond` key can provided as the string of a server capability to be required to attach, or a function with `client` and `bufnr` parameters from the `on_attach` that returns a boolean -- a `cond` key can provided as the string of a server capability to be required to attach, or a function with `client` and `bufnr` parameters from the `on_attach` that returns a boolean
-- gD = { gD = {
-- function() vim.lsp.buf.declaration() end, function() vim.lsp.buf.declaration() end,
-- desc = "Declaration of current symbol", desc = "Declaration of current symbol",
-- cond = "textDocument/declaration", cond = "textDocument/declaration",
-- }, },
-- ["<Leader>uY"] = { gl = { function() vim.diagnostic.open_float() end, desc = "Hover diagnostics" },
-- function() require("astrolsp.toggles").buffer_semantic_tokens() end, ["<Leader>uY"] = {
-- desc = "Toggle LSP semantic highlight (buffer)", function() require("astrolsp.toggles").buffer_semantic_tokens() end,
-- cond = function(client) return client.server_capabilities.semanticTokensProvider and vim.lsp.semantic_tokens end, desc = "Toggle LSP semantic highlight (buffer)",
-- }, cond = function(client)
return client:supports_method "textDocument/semanticTokens/full" and vim.lsp.semantic_tokens ~= nil
end,
},
}, },
}, },
-- A custom `on_attach` function to be run after the default `on_attach` function -- A custom `on_attach` function to be run after the default `on_attach` function
-- takes two parameters `client` and `bufnr` (`:h lspconfig-setup`) -- takes two parameters `client` and `bufnr` (`:h lsp-attach`)
on_attach = function(client, bufnr) on_attach = function(client, bufnr)
-- this would disable semanticTokensProvider for all clients -- this would disable semanticTokensProvider for all clients
-- client.server_capabilities.semanticTokensProvider = nil -- client.server_capabilities.semanticTokensProvider = nil

View File

@@ -8,7 +8,6 @@ return {
"AstroNvim/astroui", "AstroNvim/astroui",
---@type AstroUIOpts ---@type AstroUIOpts
opts = { opts = {
-- change colorscheme
colorscheme = "catppuccin", colorscheme = "catppuccin",
-- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes -- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes
highlights = { highlights = {

View File

@@ -0,0 +1,3 @@
return {
"windwp/nvim-autopairs", enabled = false
}

View File

@@ -6,5 +6,6 @@ return {
-- bg_theme = "grape", -- bg_theme = "grape",
bg_padding = 0, bg_padding = 0,
has_line_number = true, has_line_number = true,
} end } end,
enabled = false
} }

View File

@@ -21,8 +21,8 @@ return {
evaluate_template_modifiers = true, evaluate_template_modifiers = true,
received_problems_prompt_path = false, received_problems_prompt_path = false,
compile_command = { compile_command = {
c = { exec = "gcc", args = { "-O0", "-Wall", "-ggdb3", "-DDEBUG", "-fsanitize=address,undefined", "$(FNAME)", "-o", "$(FNOEXT).out", "-lm" } }, c = { exec = "gcc", args = { "-O0", "-Wall", "-ggdb3", "-DDEBUG", "-fsanitize=address,undefined", "-std=c23", "$(FNAME)", "-o", "$(FNOEXT).out", "-lm" } },
cpp = { exec = "g++", args = { "-O0", "-Wall", "-ggdb3", "-DDEBUG", "-fsanitize=address,undefined", "-D__OPTIMIZE__", "$(FNAME)", "-o", "$(FNOEXT).out" } }, cpp = { exec = "g++", args = { "-O0", "-Wall", "-ggdb3", "-DDEBUG", "-fsanitize=address,undefined", "-D__OPTIMIZE__", "-std=c++20", "$(FNAME)", "-o", "$(FNOEXT).out" } },
}, },
run_command = { run_command = {
c = { exec = "./$(FNOEXT).out" }, c = { exec = "./$(FNOEXT).out" },

View File

@@ -1,77 +0,0 @@
return {
-- customize alpha options
{
"goolord/alpha-nvim",
opts = function(_, opts)
-- customize the dashboard header
opts.section.header.val = {
" █████ ███████ ████████ ██████ ██████",
"██ ██ ██ ██ ██ ██ ██ ██",
"███████ ███████ ██ ██████ ██ ██",
"██ ██ ██ ██ ██ ██ ██ ██",
"██ ██ ███████ ██ ██ ██ ██████",
" ",
" ███  ██ ██  ██ ██ ███  ███",
" ████  ██ ██  ██ ██ ████  ████",
" ██ ██  ██ ██  ██ ██ ██ ████ ██",
" ██  ██ ██  ██  ██  ██ ██  ██  ██",
" ██   ████   ████   ██ ██  ██",
}
return opts
end,
},
-- You can disable default plugins as follows:
-- { "max397574/better-escape.nvim", enabled = false },
--
-- You can also easily customize additional setup of plugins that is outside of the plugin's setup call
-- {
-- "L3MON4D3/LuaSnip",
-- config = function(plugin, opts)
-- require "plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call
-- -- add more custom luasnip configuration such as filetype extend or custom snippets
-- local luasnip = require "luasnip"
-- luasnip.filetype_extend("javascript", { "javascriptreact" })
-- end,
-- },
-- {
-- "windwp/nvim-autopairs",
-- config = function(plugin, opts)
-- require "plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call
-- -- add more custom autopairs configuration such as custom rules
-- local npairs = require "nvim-autopairs"
-- local Rule = require "nvim-autopairs.rule"
-- local cond = require "nvim-autopairs.conds"
-- npairs.add_rules(
-- {
-- Rule("$", "$", { "tex", "latex" })
-- -- don't add a pair if the next character is %
-- :with_pair(cond.not_after_regex "%%")
-- -- don't add a pair if the previous character is xxx
-- :with_pair(
-- cond.not_before_regex("xxx", 3)
-- )
-- -- don't move right when repeat character
-- :with_move(cond.none())
-- -- don't delete if the next character is xx
-- :with_del(cond.not_after_regex "xx")
-- -- disable adding a newline when you press <cr>
-- :with_cr(cond.none()),
-- },
-- -- disable for .vim files, but it work for another filetypes
-- Rule("a", "a", "-vim")
-- )
-- end,
-- },
-- By adding to the which-key config and using our helper function you can add more which-key registered bindings
-- {
-- "folke/which-key.nvim",
-- config = function(plugin, opts)
-- require "plugins.configs.which-key"(plugin, opts) -- include the default astronvim config that calls the setup call
-- -- Add bindings which show up as group name
-- local wk = require "which-key"
-- wk.register({
-- b = { name = "Buffer" },
-- }, { mode = "n", prefix = "<leader>" })
-- end,
-- },
}

View File

@@ -61,12 +61,12 @@ return {
} }
}, },
}, },
{ -- {
"arsham/indent-tools.nvim", -- "arsham/indent-tools.nvim",
dependencies = { "arsham/arshlib.nvim" }, -- dependencies = { "arsham/arshlib.nvim" },
event = "User AstroFile", -- event = "User AstroFile",
config = function() require("indent-tools").config {} end, -- config = function() require("indent-tools").config {} end,
}, -- },
{ {
"danymat/neogen", "danymat/neogen",
cmd = "Neogen", cmd = "Neogen",
@@ -135,4 +135,12 @@ return {
}, },
opts = { n_lines = 200 }, opts = { n_lines = 200 },
}, },
{ "karb94/neoscroll.nvim",
lazy = false,
opts = {
hide_cursor = true,
stop_eof = true,
mappings = {'<C-u>', '<C-d>', '<C-b>', '<C-f>'}
}
}
} }

4
lua/plugins/kitty.lua Normal file
View File

@@ -0,0 +1,4 @@
return {
"knubie/vim-kitty-navigator",
lazy = false
}

View File

@@ -1,5 +0,0 @@
return {
"nvim-neo-tree/neo-tree.nvim",
dependencies = "nvim-lua/plenary.nvim",
lazy = false,
}

View File

@@ -1,12 +1,5 @@
return { return {
{ { "rcarriga/nvim-notify", init = false, config = true },
"rcarriga/nvim-notify",
init = false,
config = true,
opts = {
background_colour = "#000000"
}
},
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
opts = function(_, opts) opts = function(_, opts)

View File

@@ -5,18 +5,20 @@ if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
---@type LazySpec ---@type LazySpec
return { return {
"nvimtools/none-ls.nvim", "nvimtools/none-ls.nvim",
opts = function(_, config) opts = function(_, opts)
-- config variable is the default configuration table for the setup function call -- opts variable is the default configuration table for the setup function call
-- local null_ls = require "null-ls" -- local null_ls = require "null-ls"
-- Check supported formatters and linters -- Check supported formatters and linters
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting -- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics -- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
config.sources = {
-- Only insert new sources, do not replace the existing ones
-- (If you wish to replace, use `opts.sources = {}` instead of the `list_insert_unique` function)
opts.sources = require("astrocore").list_insert_unique(opts.sources, {
-- Set a formatter -- Set a formatter
-- null_ls.builtins.formatting.stylua, -- null_ls.builtins.formatting.stylua,
-- null_ls.builtins.formatting.prettier, -- null_ls.builtins.formatting.prettier,
} })
return config -- return final config table
end, end,
} }

View File

@@ -1,15 +0,0 @@
return {
"hrsh7th/nvim-cmp",
config = function(plugin, opts)
local cmp = require "cmp"
cmp.setup(opts)
cmp.setup {
experimental = {
ghost_text = true
}
}
end
}

View File

@@ -1,107 +0,0 @@
return {
"nvim-telescope/telescope.nvim",
dependencies = {
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = false },
"nvim-telescope/telescope-fzy-native.nvim",
"nvim-telescope/telescope-live-grep-args.nvim",
"nvim-telescope/telescope-hop.nvim",
"nvim-telescope/telescope-bibtex.nvim",
"nvim-telescope/telescope-file-browser.nvim",
{
"jay-babu/project.nvim",
name = "project_nvim",
event = "VeryLazy",
opts = { ignore_lsp = { "lua_ls", "julials" } },
},
},
opts = function(_, opts)
local telescope = require "telescope"
local actions = require "telescope.actions"
local fb_actions = require("telescope").extensions.file_browser.actions
local lga_actions = require "telescope-live-grep-args.actions"
local hop = telescope.extensions.hop
return require("astrocore").extend_tbl(opts, {
defaults = {
results_title = "",
selection_caret = " ",
layout_config = {
width = 0.90,
height = 0.85,
preview_cutoff = 120,
horizontal = {
preview_width = 0.6,
},
vertical = {
width = 0.9,
height = 0.95,
preview_height = 0.5,
},
flex = {
horizontal = {
preview_width = 0.9,
},
},
},
mappings = {
i = {
["<C-h>"] = hop.hop,
["<C-space>"] = function(prompt_bufnr)
hop._hop_loop(
prompt_bufnr,
{ callback = actions.toggle_selection, loop_callback = actions.send_selected_to_qflist }
)
end,
},
},
},
extensions = {
bibtex = { context = true, context_fallback = false },
file_browser = {
mappings = {
i = {
["<C-z>"] = fb_actions.toggle_hidden,
},
n = {
z = fb_actions.toggle_hidden,
},
},
},
live_grep_args = {
auto_quoting = true, -- enable/disable auto-quoting
mappings = { -- extend mappings
i = {
["<C-a>"] = lga_actions.quote_prompt(),
["<C-f>"] = lga_actions.quote_prompt { postfix = " --iglob " },
},
},
},
},
pickers = {
find_files = {
hidden = true,
find_command = function(cfg)
local find_command = { "rg", "--files", "--color", "never" }
if not cfg.no_ignore then vim.list_extend(find_command, { "--glob", "!**/.git/**" }) end
return find_command
end,
},
buffers = {
path_display = { "smart" },
mappings = {
i = { ["<c-d>"] = actions.delete_buffer },
n = { ["d"] = actions.delete_buffer },
},
},
},
})
end,
config = function(...)
-- require "plugins.configs.telescope"(...)
local telescope = require "telescope"
telescope.load_extension "fzy_native"
telescope.load_extension "live_grep_args"
telescope.load_extension "bibtex"
telescope.load_extension "file_browser"
telescope.load_extension "projects"
end,
}

View File

@@ -1,47 +1,20 @@
-- Customize Treesitter
-- --------------------
-- Treesitter customizations are handled with AstroCore
-- as nvim-treesitter simply provides a download utility for parsers
---@type LazySpec
return { return {
{ "AstroNvim/astrocore",
"nvim-treesitter/nvim-treesitter", ---@type AstroCoreOpts
lazy = false, opts = {
dependencies = "AstroNvim/astrocore", treesitter = {
opts = function(_, opts) highlight = true, -- enable/disable treesitter based highlighting
-- add more things to the ensure_installed table protecting against community packs modifying it indent = true, -- enable/disable treesitter based indentation
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { auto_install = true, -- enable/disable automatic installation of detected languages
"lua",
"cpp",
"c",
"bash",
"vim",
"markdown",
"asm",
"cmake",
"css",
"html",
"javascript",
"printf",
"fish",
"git_config",
"git_rebase",
"gitcommit",
"gitignore",
"gitattributes",
"java",
"meson",
"ninja",
"python",
"sql",
"typescript",
"vimdoc",
"xml"
})
end,
config = function()
require("nvim-treesitter.configs").setup {
highlight = {
enable = true,
additional_vim_regex_highlighting = false
},
ensure_installed = { ensure_installed = {
"lua", "lua",
"vim",
"cpp", "cpp",
"c", "c",
"bash", "bash",
@@ -67,8 +40,8 @@ return {
"typescript", "typescript",
"vimdoc", "vimdoc",
"xml" "xml"
} -- add more arguments for adding more treesitter parsers
} },
end },
} },
} }

View File

@@ -1,12 +1,91 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- You can also add or configure plugins by creating files in this `plugins/` folder
-- PLEASE REMOVE THE EXAMPLES YOU HAVE NO INTEREST IN BEFORE ENABLING THIS FILE
-- Here are some examples:
---@type LazySpec
return { return {
-- You can also add new plugins here as well:
-- Add plugins, the lazy syntax -- == Examples of Adding Plugins ==
-- "andweeb/presence.nvim",
-- { "andweeb/presence.nvim",
-- "ray-x/lsp_signature.nvim", {
-- event = "BufRead", "ray-x/lsp_signature.nvim",
-- config = function() event = "BufRead",
-- require("lsp_signature").setup() config = function() require("lsp_signature").setup() end,
-- end, },
-- },
-- == Examples of Overriding Plugins ==
-- customize dashboard options
{
"folke/snacks.nvim",
opts = {
dashboard = {
preset = {
header = table.concat({
" █████ ███████ ████████ ██████ ██████ ",
"██ ██ ██ ██ ██ ██ ██ ██",
"███████ ███████ ██ ██████ ██ ██",
"██ ██ ██ ██ ██ ██ ██ ██",
"██ ██ ███████ ██ ██ ██ ██████ ",
"",
"███  ██ ██  ██ ██ ███  ███",
"████  ██ ██  ██ ██ ████  ████",
"██ ██  ██ ██  ██ ██ ██ ████ ██",
"██  ██ ██  ██  ██  ██ ██  ██  ██",
"██   ████   ████   ██ ██  ██",
}, "\n"),
},
},
},
},
-- You can disable default plugins as follows:
{ "max397574/better-escape.nvim", enabled = false },
-- You can also easily customize additional setup of plugins that is outside of the plugin's setup call
{
"L3MON4D3/LuaSnip",
config = function(plugin, opts)
-- add more custom luasnip configuration such as filetype extend or custom snippets
local luasnip = require "luasnip"
luasnip.filetype_extend("javascript", { "javascriptreact" })
-- include the default astronvim config that calls the setup call
require "astronvim.plugins.configs.luasnip"(plugin, opts)
end,
},
{
"windwp/nvim-autopairs",
config = function(plugin, opts)
require "astronvim.plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call
-- add more custom autopairs configuration such as custom rules
local npairs = require "nvim-autopairs"
local Rule = require "nvim-autopairs.rule"
local cond = require "nvim-autopairs.conds"
npairs.add_rules(
{
Rule("$", "$", { "tex", "latex" })
-- don't add a pair if the next character is %
:with_pair(cond.not_after_regex "%%")
-- don't add a pair if the previous character is xxx
:with_pair(
cond.not_before_regex("xxx", 3)
)
-- don't move right when repeat character
:with_move(cond.none())
-- don't delete if the next character is xx
:with_del(cond.not_after_regex "xx")
-- disable adding a newline when you press <cr>
:with_cr(cond.none()),
},
-- disable for .vim files, but it work for another filetypes
Rule("a", "a", "-vim")
)
end,
enabled = false,
},
} }

View File

@@ -1,18 +1,5 @@
if true then return end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE if true then return end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- This will run last in the setup process and is a good place to configure -- This will run last in the setup process.
-- things like custom filetypes. This just pure lua so anything that doesn't -- This is just pure lua so anything that doesn't
-- fit in the normal config locations above can go here -- fit in the normal config locations above can go here
-- Set up custom filetypes
vim.filetype.add {
extension = {
foo = "fooscript",
},
filename = {
["Foofile"] = "fooscript",
},
pattern = {
["~/%.config/foo/.*"] = "fooscript",
},
}