Files
nvim/init.lua
T
2026-04-21 20:56:46 +02:00

129 lines
3.8 KiB
Lua

vim.loader.enable()
local log = require("log")
local files = {
"autocommands",
"commands",
"filetypes",
"globals",
"keymap",
"options",
}
for _, file in ipairs(files) do
local pkg = "core." .. file
local ok, err = pcall(require, pkg)
if not ok then
---@cast err string
log.error("Error while loading package " .. pkg)
log.error(err)
return
end
end
require("pack").setup({
"https://github.com/navarasu/onedark.nvim",
"https://github.com/ibhagwan/fzf-lua",
"https://github.com/neovim/nvim-lspconfig",
"https://github.com/mason-org/mason.nvim",
"https://github.com/owallb/mason-auto-install.nvim",
"https://github.com/mfussenegger/nvim-dap",
"https://github.com/numToStr/Comment.nvim",
"https://github.com/tpope/vim-fugitive",
"https://github.com/lewis6991/gitsigns.nvim",
"https://github.com/MagicDuck/grug-far.nvim",
"https://github.com/nvim-tree/nvim-tree.lua",
"https://github.com/stevearc/oil.nvim",
"https://github.com/hedyhli/outline.nvim",
"nvim.undotree",
{
"https://github.com/saghen/blink.cmp",
version = vim.version.range("^1"),
},
})
require("ts").setup({
parsers = {
"https://github.com/tree-sitter/tree-sitter-bash",
-- required by cpp
"https://github.com/tree-sitter/tree-sitter-c",
"https://github.com/uyha/tree-sitter-cmake",
"https://github.com/stsewd/tree-sitter-comment",
"https://github.com/tree-sitter/tree-sitter-cpp",
-- required by scss
"https://github.com/tree-sitter/tree-sitter-css",
"https://github.com/gbprod/tree-sitter-gitcommit",
"https://github.com/tree-sitter/tree-sitter-go",
{
"https://github.com/ngalaiko/tree-sitter-go-template",
lang = "gotmpl",
},
"https://github.com/tree-sitter/tree-sitter-html",
"https://github.com/tree-sitter/tree-sitter-json",
"https://github.com/tree-sitter-grammars/tree-sitter-luadoc",
{
"https://github.com/tree-sitter/tree-sitter-php",
specs = {
{ lang = "php", location = "php" },
{ lang = "php_only", location = "php_only" },
},
},
"https://github.com/tree-sitter/tree-sitter-python",
"https://github.com/tree-sitter/tree-sitter-rust",
"https://github.com/serenadeai/tree-sitter-scss",
{
"https://github.com/derekstride/tree-sitter-sql",
version = "gh-pages",
},
"https://github.com/tree-sitter-grammars/tree-sitter-svelte",
{
"https://github.com/tree-sitter/tree-sitter-typescript",
specs = {
{ lang = "typescript", location = "typescript" },
{ lang = "tsx", location = "tsx" },
},
},
{
"https://github.com/tree-sitter-grammars/tree-sitter-xml",
specs = {
{ lang = "xml", location = "xml" },
{ lang = "dtd", location = "dtd" },
},
},
"https://github.com/tree-sitter-grammars/tree-sitter-yaml",
"https://github.com/georgeharker/tree-sitter-zsh",
},
languages = {
"bash",
"c", -- builtin
"cmake",
"comment",
"cpp",
"css",
"gitcommit",
"go",
"gotmpl",
"html",
"json",
"lua", -- builtin
"luadoc",
"markdown", -- builtin
"markdown_inline", -- builtin
"php",
"python",
"query", -- builtin
"rust",
"scss",
"sql",
"svelte",
"tsx",
"typescript",
"vim", -- builtin
"vimdoc", -- builtin
"xml",
"yaml",
"zsh",
},
})