Compare commits

...

No commits in common. "main" and "single_file" have entirely different histories.

28 changed files with 378 additions and 1238 deletions

View File

@ -1,8 +1,6 @@
# AstroNvim Template
# AstroNvim User Configuration Example
**NOTE:** This is for AstroNvim v5+
A template for getting started with [AstroNvim](https://github.com/AstroNvim/AstroNvim)
A user configuration template for [AstroNvim](https://github.com/AstroNvim/AstroNvim)
## 🛠️ Installation
@ -11,8 +9,12 @@ A template for getting started with [AstroNvim](https://github.com/AstroNvim/Ast
```shell
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
mv ~/.local/state/nvim ~/.local/state/nvim.bak
mv ~/.cache/nvim ~/.cache/nvim.bak
```
#### Clone AstroNvim
```shell
git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim
```
#### Create a new user repository from this template
@ -24,7 +26,7 @@ You can also just clone this repository directly if you do not want to track you
#### Clone the repository
```shell
git clone https://github.com/<your_user>/<your_repository> ~/.config/nvim
git clone https://github.com/<your_user>/<your_repository> ~/.config/nvim/lua/user
```
#### Start Neovim

View File

@ -1,3 +0,0 @@
{
"format.enable": false
}

View File

@ -1,20 +0,0 @@
{
"neodev": {
"library": {
"enabled": true,
"plugins": true
}
},
"neoconf": {
"plugins": {
"lua_ls": {
"enabled": true
}
}
},
"lspconfig": {
"lua_ls": {
"Lua.format.enable": false
}
}
}

393
init.lua
View File

@ -1,28 +1,373 @@
-- 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.
local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
-- AstroNvim Configuration Table
-- All configuration changes should go inside of the table below
if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then
-- stylua: ignore
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
-- You can think of a Lua "table" as a dictionary like data structure the
-- normal format is "key = value". These also handle array like data structures
-- where a value with no key simply has an implicit numeric key
local config = {
vim.opt.rtp:prepend(lazypath)
-- 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 = "main", -- 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
-- },
},
-- validate that lazy is available
if not pcall(require, "lazy") then
-- stylua: ignore
vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
vim.fn.getchar()
vim.cmd.quit()
end
-- Set colorscheme to use
colorscheme = "astrodark",
require "lazy_setup"
require "polish"
require "mappings"
-- Add highlight groups in any theme
highlights = {
-- init = { -- this table overrides highlights in all themes
-- Normal = { bg = "#000000" },
-- }
-- duskfox = { -- a table of overrides/changes to the duskfox theme
-- Normal = { bg = "#000000" },
-- },
},
-- set vim options here (vim.<first_key>.<second_key> = value)
options = {
opt = {
-- set to true or false etc.
relativenumber = true, -- sets vim.opt.relativenumber
number = true, -- sets vim.opt.number
spell = false, -- sets vim.opt.spell
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
wrap = false, -- sets vim.opt.wrap
},
g = {
mapleader = " ", -- sets vim.g.mapleader
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
},
},
-- If you need more control, you can use the function()...end notation
-- options = function(local_vim)
-- local_vim.opt.relativenumber = true
-- local_vim.g.mapleader = " "
-- local_vim.opt.whichwrap = vim.opt.whichwrap - { 'b', 's' } -- removing option from list
-- local_vim.opt.shortmess = vim.opt.shortmess + { I = true } -- add to option list
--
-- return local_vim
-- end,
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
diagnostics = {
underline = true,
},
-- Extend LSP configuration
lsp = {
-- enable servers that you already have installed without mason
servers = {
-- "pyright"
},
formatting = {
-- control auto formatting on save
format_on_save = {
enabled = true, -- enable or disable format on save globally
allow_filetypes = { -- enable format on save for specified filetypes only
-- "go",
},
ignore_filetypes = { -- disable format on save for specified filetypes
-- "python",
},
},
disabled = { -- disable formatting capabilities for the listed language servers
-- "lua_ls",
},
timeout_ms = 1000, -- default format timeout
-- filter = function(client) -- fully override the default formatting function
-- return true
-- end
},
-- easily add or disable built in mappings added during LSP attaching
mappings = {
n = {
-- ["<leader>lf"] = false -- disable formatting keymap
},
},
-- add to the global LSP on_attach function
-- on_attach = function(client, bufnr)
-- end,
-- override the LSP setup handler function based on server name
-- setup_handlers = {
-- -- first function changes the default setup handler
-- function(server, opts) require("lspconfig")[server].setup(opts) end,
-- -- keys for a specific server name will be used for that LSP
-- lua_ls = function(server, opts)
-- -- custom lua_ls setup handler
-- require("lspconfig")["lua_ls"].setup(opts)
-- end,
-- },
-- Add overrides for LSP server settings, the keys are the name of the server
config = {
-- example for addings schemas to yamlls
-- yamlls = { -- override table for require("lspconfig").yamlls.setup({...})
-- settings = {
-- yaml = {
-- schemas = {
-- ["http://json.schemastore.org/github-workflow"] = ".github/workflows/*.{yml,yaml}",
-- ["http://json.schemastore.org/github-action"] = ".github/action.{yml,yaml}",
-- ["http://json.schemastore.org/ansible-stable-2.9"] = "roles/tasks/*.{yml,yaml}",
-- },
-- },
-- },
-- },
},
},
-- Mapping data with "desc" stored directly by vim.keymap.set().
--
-- Please use this mappings table to set keyboard mapping since this is the
-- lower level configuration and more robust one. (which-key will
-- automatically pick-up stored data by this setting.)
mappings = {
-- first key is the mode
n = {
-- second key is the lefthand side of the map
-- mappings seen under group name "Buffer"
["<leader>bb"] = { "<cmd>tabnew<cr>", desc = "New tab" },
["<leader>bc"] = { "<cmd>BufferLinePickClose<cr>", desc = "Pick to close" },
["<leader>bj"] = { "<cmd>BufferLinePick<cr>", desc = "Pick to jump" },
["<leader>bt"] = { "<cmd>BufferLineSortByTabs<cr>", desc = "Sort by tabs" },
-- tables with the `name` key will be registered with which-key if it's installed
-- this is useful for naming menus
["<leader>b"] = { name = "Buffers" },
-- quick save
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
},
t = {
-- setting a mapping to false will disable it
-- ["<esc>"] = false,
},
},
-- Configure require("lazy").setup() options
lazy = {
defaults = { lazy = true },
performance = {
rtp = {
-- customize default disabled vim plugins
disabled_plugins = {
"tohtml",
"gzip",
"matchit",
"zipPlugin",
"netrwPlugin",
"tarPlugin",
},
},
},
},
-- Configure plugins
plugins = {
-- 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)
-- -- Add bindings which show up as group name
-- local wk = require "which-key"
-- wk.register({
-- b = { name = "Buffer" },
-- }, { mode = "n", prefix = "<leader>" })
-- end,
-- },
-- You can also add new plugins here as well:
-- Add plugins, the lazy syntax
-- "andweeb/presence.nvim",
-- {
-- "ray-x/lsp_signature.nvim",
-- event = "BufRead",
-- config = function()
-- require("lsp_signature").setup()
-- end,
-- },
-- Plugin entries can also be used to override the default options for plugins as well
{
"goolord/alpha-nvim",
opts = function(_, opts)
-- customize the dashboard header
opts.section.header.val = {
" █████ ███████ ████████ ██████ ██████",
"██ ██ ██ ██ ██ ██ ██ ██",
"███████ ███████ ██ ██████ ██ ██",
"██ ██ ██ ██ ██ ██ ██ ██",
"██ ██ ███████ ██ ██ ██ ██████",
" ",
" ███  ██ ██  ██ ██ ███  ███",
" ████  ██ ██  ██ ██ ████  ████",
" ██ ██  ██ ██  ██ ██ ██ ████ ██",
" ██  ██ ██  ██  ██  ██ ██  ██  ██",
" ██   ████   ████   ██ ██  ██",
}
return opts
end,
},
{
"jose-elias-alvarez/null-ls.nvim",
opts = function(_, config)
-- config variable is the default configuration table for the setup function call
-- local null_ls = require "null-ls"
-- Check supported formatters and linters
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
config.sources = {
-- Set a formatter
-- null_ls.builtins.formatting.stylua,
-- null_ls.builtins.formatting.prettier,
}
return config -- return final config table
end,
},
{
"nvim-treesitter/nvim-treesitter",
opts = {
-- ensure_installed = { "lua" },
},
},
-- use mason-lspconfig to configure LSP installations
{
"williamboman/mason-lspconfig.nvim",
-- overrides `require("mason-lspconfig").setup(...)`
opts = {
-- ensure_installed = { "lua_ls" },
},
},
-- use mason-null-ls to configure Formatters/Linter installation for null-ls sources
{
"jay-babu/mason-null-ls.nvim",
-- overrides `require("mason-null-ls").setup(...)`
opts = {
-- ensure_installed = { "prettier", "stylua" },
},
},
{
"jay-babu/mason-nvim-dap.nvim",
-- overrides `require("mason-nvim-dap").setup(...)`
opts = {
-- ensure_installed = { "python" },
},
},
-- Add the community repository of plugin specifications
"AstroNvim/astrocommunity",
-- example of imporing a plugin, comment out to use it or add your own
-- available plugins can be found at https://github.com/AstroNvim/astrocommunity
-- { import = "astrocommunity.colorscheme.catppuccin" },
-- { import = "astrocommunity.completion.copilot-lua-cmp" },
},
-- Customize Heirline options
heirline = {
-- -- Customize different separators between sections
-- separators = {
-- breadcrumbs = " > ",
-- tab = { "", "" },
-- },
-- -- Customize colors for each element each element has a `_fg` and a `_bg`
-- colors = function(colors)
-- colors.git_branch_fg = require("astronvim.utils").get_hlgroup "Conditional"
-- return colors
-- end,
-- -- Customize attributes of highlighting in Heirline components
-- attributes = {
-- -- styling choices for each heirline element, check possible attributes with `:h attr-list`
-- git_branch = { bold = true }, -- bold the git branch statusline component
-- },
-- -- Customize if icons should be highlighted
-- icon_highlights = {
-- breadcrumbs = false, -- LSP symbols in the breadcrumbs
-- file_icon = {
-- winbar = false, -- Filetype icon in the winbar inactive windows
-- statusline = true, -- Filetype icon in the statusline
-- tabline = true, -- Filetype icon in the tabline
-- },
-- },
},
-- 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",
-- },
-- }
end,
}
return config

View File

@ -1,78 +0,0 @@
{
"AstroNvim": { "branch": "main", "commit": "c399f7f46daa010db1b70f6f7062a6a85216e1de" },
"LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" },
"actions-preview.nvim": { "branch": "master", "commit": "2b604b2e8e662c03b716436f6ffebcb19663e66a" },
"aerial.nvim": { "branch": "master", "commit": "645d108a5242ec7b378cbe643eb6d04d4223f034" },
"animation.nvim": { "branch": "main", "commit": "fb77091ab72ec9971aee0562e7081182527aaa6a" },
"astrocommunity": { "branch": "main", "commit": "39edda038177a8b8d4838536160cfbd006b540dc" },
"astrocore": { "branch": "main", "commit": "b061e0c185cd5fecbac7489151a98117ce799a47" },
"astrolsp": { "branch": "main", "commit": "ebc1676127b3bfbd46e3e26589b104853cac3730" },
"astrotheme": { "branch": "main", "commit": "cf0e65a7b3ce2f830b052f4da937729eee1e7a7d" },
"astroui": { "branch": "main", "commit": "920dd5df6629a9076a11ea10f0d21f4225203585" },
"better-escape.nvim": { "branch": "master", "commit": "199dcc2643dec5d8dbdab4ec672cf405224dcb3b" },
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
"blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" },
"catppuccin": { "branch": "main", "commit": "426dbebe06b5c69fd846ceb17b42e12f890aedf1" },
"clangd_extensions.nvim": { "branch": "main", "commit": "872893cb061044a4cc7ced59c0f2fe2d70db4382" },
"cmake-tools.nvim": { "branch": "master", "commit": "bac6ba2354a52c61f731c751cdb0f4e24669bf0d" },
"cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" },
"codecompanion.nvim": { "branch": "main", "commit": "fe792b30974893d8809b06c5e31c5c876c14bbc7" },
"crates.nvim": { "branch": "main", "commit": "0f536967abd097d9a4275087483f15d012418740" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"garbage-day.nvim": { "branch": "main", "commit": "2fcc56556281de8ee871a5f3beb9db7ab747ef32" },
"gitsigns.nvim": { "branch": "main", "commit": "a462f416e2ce4744531c6256252dee99a7d34a83" },
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
"heirline.nvim": { "branch": "master", "commit": "fae936abb5e0345b85c3a03ecf38525b0828b992" },
"homeassistant-nvim": { "branch": "main", "commit": "1484ec0ad211eaeefa977444e3c6d0987b20a349" },
"hover.nvim": { "branch": "main", "commit": "e73c00da3a9c87a21d2a8ddf7ab4a39824bd5d56" },
"image.nvim": { "branch": "master", "commit": "da2be65c153ba15a14a342b05591652a6df70d58" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
"lsp-lens.nvim": { "branch": "main", "commit": "48bb1a7e271424c15f3d588d54adc9b7c319d977" },
"lsp_signature.nvim": { "branch": "master", "commit": "a65b38f260cc3470a05b4afb84c8d868617d476d" },
"lualine.nvim": { "branch": "master", "commit": "f5d2a8570f8b736ddb9bb4be504355bcd6e15ec8" },
"magick": { "branch": "master", "commit": "6971fa700c4d392130492a3925344b51c7cc54aa" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"markview.nvim": { "branch": "main", "commit": "1861f959599ae03cfd59f56222a542035b0cd947" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "25f609e7fca78af7cede4f9fa3af8a94b1c4950b" },
"mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "e51f9b259f066c4347f9a79ffde54c29a0619384" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" },
"mini.icons": { "branch": "main", "commit": "ff2e4f1d29f659cc2bad0f9256f2f6195c6b2428" },
"mini.indentscope": { "branch": "main", "commit": "e0601f75aa5137a5a13bb92a988c9a300f5bd3de" },
"neo-tree.nvim": { "branch": "main", "commit": "84c75e7a7e443586f60508d12fc50f90d9aee14e" },
"none-ls.nvim": { "branch": "main", "commit": "7f9301e416533b5d74e2fb3b1ce5059eeaed748b" },
"nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" },
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
"nvim-dap": { "branch": "master", "commit": "45a69eba683a2c448dd9ecfc4de89511f0646b5f" },
"nvim-dap-python": { "branch": "master", "commit": "1808458eba2b18f178f990e01376941a42c7f93b" },
"nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" },
"nvim-highlight-colors": { "branch": "main", "commit": "e2cb22089cc2358b2b995c09578224f142de6039" },
"nvim-lsp-file-operations": { "branch": "master", "commit": "b9c795d3973e8eec22706af14959bc60c579e771" },
"nvim-lspconfig": { "branch": "master", "commit": "0203a9608d63eda57679b01e69f33a7b4c34b0d1" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-treesitter": { "branch": "main", "commit": "90cd6580e720caedacb91fdd587b747a6e77d61f" },
"nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" },
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
"nvim-vtsls": { "branch": "main", "commit": "0b5f73c9e50ce95842ea07bb3f05c7d66d87d14a" },
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
"package-info.nvim": { "branch": "master", "commit": "52e407af634cd5d3add0dc916c517865850113a4" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"remote-sshfs.nvim": { "branch": "main", "commit": "7a12a1677bbe96ca98f0c713448ac1f518ba09b7" },
"resession.nvim": { "branch": "master", "commit": "cc819b0489938d03e4f3532a583354f0287c015b" },
"rustaceanvim": { "branch": "main", "commit": "7b8dd7abb9a7f442b356aa03714aefce09610339" },
"rustowl": { "branch": "main", "commit": "aaf7d15cc55ff6f48c577cdd6352d51fbc031aea" },
"smart-splits.nvim": { "branch": "master", "commit": "0bd02161ee5c5378bf4133fcedf53d1fc4179e1d" },
"snacks.nvim": { "branch": "main", "commit": "e6fd58c82f2f3fcddd3fe81703d47d6d48fc7b9f" },
"telescope.nvim": { "branch": "master", "commit": "48d2656e54d3e3953ae647153ccdaffa50d4d76b" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" },
"tsc.nvim": { "branch": "main", "commit": "e083bcf1e54bc3af7df92b33235efb334e8c782c" },
"which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" },
"windows.nvim": { "branch": "main", "commit": "c7492552b23d0ab30325e90b56066ec51242adc8" },
"yazi.nvim": { "branch": "main", "commit": "172bd64a4c2d3adbe2e0ef56289f47ffe139ca55" }
}

View File

@ -1,76 +0,0 @@
--if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- 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 {
"AstroNvim/astrocommunity",
version = "^20",
{ import = "astrocommunity.pack.lua" },
{ import = "astrocommunity.pack.rust" },
{ import = "astrocommunity.pack.python" },
{ import = "astrocommunity.pack.vue" },
-- { import = "astrocommunity.pack.typescript-all-in-one" },
{ import = "astrocommunity.pack.typescript" },
{ import = "astrocommunity.pack.cpp" },
-- import/override with your plugins folder
{
import = "astrocommunity.colorscheme.catppuccin",
},
{
import = "astrocommunity.markdown-and-latex.markdown-preview-nvim",
},
-- {
-- import = "astrocommunity.completion.copilot-lua",
-- },
{
import = "astrocommunity.ai.codecompanion-nvim",
},
{
import = "astrocommunity.file-explorer.yazi-nvim",
},
{
import = "astrocommunity.bars-and-lines.lualine-nvim",
},
{
import = "astrocommunity.utility.hover-nvim",
},
{
import = "astrocommunity.split-and-window.windows-nvim",
},
{
import = "astrocommunity.lsp.lsp-lens-nvim",
},
{
import = "astrocommunity.lsp.lsp-signature-nvim",
},
{
import = "astrocommunity.lsp.actions-preview-nvim",
},
{
import = "astrocommunity.lsp.garbage-day-nvim",
},
{
import = "astrocommunity.indent.mini-indentscope",
},
{
import = "astrocommunity.indent.snacks-indent-hlchunk",
},
{
import = "astrocommunity.markdown-and-latex.markview-nvim",
},
{
import = "astrocommunity.media.image-nvim",
},
{
import = "astrocommunity.editing-support.rustowl",
},
{
import = "astrocommunity.git.diffview-nvim",
},
{
import = "astrocommunity.comment.ts-comments-nvim",
},
}

View File

@ -1,33 +0,0 @@
require("lazy").setup({
{
"AstroNvim/AstroNvim",
version = "^6", -- Remove version tracking to elect for nightly AstroNvim
import = "astronvim.plugins",
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
maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up
icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available)
pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override
update_notifications = true, -- Enable/disable notification about running `:Lazy update` twice to update pinned plugins
},
},
{ import = "community" },
{ import = "plugins" },
} --[[@as LazySpec]], {
-- Configure any other `lazy.nvim` configuration options here
-- install = { colorscheme = { "astrotheme", "habamax" } },
-- install = { colorscheme = { "catppuccin", "latte" } },
ui = { backdrop = 100 },
performance = {
rtp = {
-- disable some rtp plugins, add more to your liking
disabled_plugins = {
"gzip",
"netrwPlugin",
"tarPlugin",
"tohtml",
"zipPlugin",
},
},
},
} --[[@as LazyConfig]])

View File

@ -1,4 +0,0 @@
vim.keymap.set("n", "<S-g>", "<cmd>:wincmd k<cr>")
vim.keymap.set("n", "<S-r>", "<cmd>:wincmd j<cr>")
vim.keymap.set("n", "<S-n>", "<cmd>:wincmd h<cr>")
vim.keymap.set("n", "<S-t>", "<cmd>:wincmd l<cr>")

View File

@ -1,38 +0,0 @@
return {
"actions-preview.nvim",
opts = function(_, opts)
local hl = require "actions-preview.highlight"
-- opts.diff = opts.diff or {}
-- opts.diff.ctxlen = 3
opts.highlight_command = {
hl.delta "/usr/bin/delta --no-gitconfig --side-by-side",
}
opts.backend = { "snacks" }
-- opts.telescope = opts.telescope or {}
opts.telescope = {
sorting_strategy = "ascending",
layout_strategy = "vertical",
layout_config = {
width = 0.8,
height = 0.9,
prompt_position = "top",
preview_cutoff = 20,
preview_height = function(_, _, max_lines) return max_lines - 15 end,
},
}
---@type snacks.picker.Config
opts.snacks = {
layout = {
preset = "vertical",
-- assert -- backdrop = false,
-- -- width = 0.8,
-- -- height = 0.9,
-- { win = "input", height = 1, border = "rounded" },
-- { win = "list", border = "rounded" },
-- { win = "preview", title = "{preview}", border = "rounded", grow = true },
},
}
return opts
end,
}

View File

@ -1,92 +0,0 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- AstroCore provides a central place to modify mappings, vim options, autocommands, and more!
-- Configuration documentation can be found with `:h astrocore`
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
-- as this provides autocomplete and documentation while editing
---@type LazySpec
return {
"AstroNvim/astrocore",
---@type AstroCoreOpts
opts = {
-- Configure core features of AstroNvim
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 = { virtual_text = true, virtual_lines = false }, -- diagnostic settings on startup
highlighturl = true, -- highlight URLs at start
notifications = true, -- enable notifications at start
},
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
diagnostics = {
virtual_text = 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
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
},
g = { -- vim.g.<key>
-- configure global vim variables (vim.g)
-- 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
},
},
-- Mappings can be configured through AstroCore as well.
-- NOTE: keycodes follow the casing in the vimdocs. For example, `<Leader>` must be capitalized
mappings = {
-- first key is the mode
n = {
-- 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(
)
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" },
["<S-g>"] = { "<C-w>k" },
["<S-r>"] = { "<C-w>j" },
["<S-n>"] = { "<C-w>h" },
["<S-t>"] = { "<C-w>l" },
-- setting a mapping to false will disable it
-- ["<C-S>"] = false,
},
v = {
["<S-up>"] = { ":m '<-2<CR>gv=gv'" },
["<S-down>"] = { ":m '>+1<CR>gv=gv'" },
},
},
},
}

View File

@ -1,102 +0,0 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- AstroLSP allows you to customize the features in AstroNvim's LSP configuration engine
-- Configuration documentation can be found with `:h astrolsp`
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
-- as this provides autocomplete and documentation while editing
---@type LazySpec
return {
"AstroNvim/astrolsp",
---@type AstroLSPOpts
opts = {
features = {
semantic_tokens = true,
},
formatting = {
-- control auto formatting on save
format_on_save = {
enabled = true, -- enable or disable format on save globally
allow_filetypes = { -- enable format on save for specified filetypes only
-- "go",
},
ignore_filetypes = { -- disable format on save for specified filetypes
-- "python",
},
},
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
-- "lua_ls",
"volar",
"vtsls",
},
timeout_ms = 1000, -- default format timeout
-- filter = function(client) -- fully override the default formatting function
-- return true
-- end
},
-- enable servers that you already have installed without mason
servers = {
-- "pyright"
},
-- 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`)
config = {
-- ["*"] = { capabilities = {} }, -- modify default LSP client settings such as capabilities
},
-- customize how language servers are attached
handlers = {
-- a function with the key `*` modifies the default handler, functions takes the server name as the parameter
-- ["*"] = function(server) vim.lsp.enable(server) end
-- 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
},
-- Configure buffer local auto commands to add when attaching a language server
autocmds = {
-- first key is the `augroup` to add the auto commands to (:h augroup)
lsp_codelens_refresh = {
-- 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`
-- 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
cond = "textDocument/codeLens",
-- cond = function(client, bufnr) return client.name == "lua_ls" end,
-- list of auto commands to set
{
-- events to trigger
event = { "InsertLeave", "BufEnter" },
-- the rest of the autocmd options (:h nvim_create_autocmd)
desc = "Refresh codelens (buffer)",
callback = function(args)
if require("astrolsp").config.features.codelens then vim.lsp.codelens.refresh { bufnr = args.buf } end
end,
},
},
},
-- mappings to be set up on attaching of a language server
mappings = {
n = {
-- 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 = {
function() vim.lsp.buf.declaration() end,
desc = "Declaration of current symbol",
cond = "textDocument/declaration",
},
["<Leader>uY"] = {
function() require("astrolsp.toggles").buffer_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
-- takes two parameters `client` and `bufnr` (`:h lsp-attach`)
on_attach = function(client, bufnr)
-- this would disable semanticTokensProvider for all clients
-- client.server_capabilities.semanticTokensProvider = nil
end,
},
}

View File

@ -1,37 +0,0 @@
-- AstroUI provides the basis for configuring the AstroNvim User Interface
-- Configuration documentation can be found with `:h astroui`
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
-- as this provides autocomplete and documentation while editing
---@type LazySpec
return {
"AstroNvim/astroui",
---@type AstroUIOpts
opts = {
-- change colorscheme
colorscheme = "catppuccin",
-- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes
highlights = {
init = { -- this table overrides highlights in all themes
-- Normal = { bg = "#000000" },
},
astrodark = { -- a table of overrides/changes when applying the astrotheme theme
-- Normal = { bg = "#000000" },
},
},
-- Icons can be configured throughout the interface
icons = {
-- configure the loading of the lsp in the status line
LSPLoading1 = "",
LSPLoading2 = "",
LSPLoading3 = "",
LSPLoading4 = "",
LSPLoading5 = "",
LSPLoading6 = "",
LSPLoading7 = "",
LSPLoading8 = "",
LSPLoading9 = "",
LSPLoading10 = "",
},
},
}

View File

@ -1,82 +0,0 @@
--if true then return {} end
return {
"olimorris/codecompanion.nvim",
opts = function(_, opts)
opts = opts or {}
-- Wir bauen die Struktur EXAKT wie in deinem Doku-Beispiel
opts.adapters = {
-- Die Ebene 'http' ist hier der entscheidende Container
http = {
my_imac = function()
return require("codecompanion.adapters").extend("openai_compatible", {
env = {
url = os.getenv "LOCAL_LLM", -- Dein lokaler iMac Port
api_key = "local-not-needed",
},
schema = {
model = {
default = "qwen2.5-7b-coder",
},
},
})
end,
my_gemini = function()
return require("codecompanion.adapters").extend("gemini", {
env = {
-- Ersetze dies durch deinen echten API Key oder nutze eine Umgebungsvariable
api_key = os.getenv "GEMENI_API_KEY",
},
schema = {
model = {
--default = "gemini-2.5-flash", -- oder "gemini-1.5-flash"
default = "gemma-2-2b-it-Q8_0",
},
},
})
end,
},
}
-- Jetzt sagen wir den Strategien, wo sie suchen sollen:
-- Der Pfad ist intern nun "http.my_imac"
opts.strategies = {
chat = { adapter = "my_gemini" },
inline = { adapter = "my_gemini" },
agent = { adapter = "my_gemini" },
}
opts.prompt_library = {
["Generate Commit Message"] = {
strategy = "chat",
description = "Erstellt eine Commit-Message basierend auf den Staged Changes",
opts = {
index = 1,
is_default = true,
is_slash_cmd = true, -- Erlaubt /commit im Chat
short_name = "commit",
auto_submit = true,
},
prompts = {
{
role = "system",
content = "Write a concise commit message in Conventional Commits format based on the diff provided. Use present tense. Do not use wordy explanations.",
},
{
role = "user",
content = function()
return "Hier ist der Diff der gestageden Änderungen:\n\n```diff\n"
.. vim.fn.system "git diff --staged"
.. "\n```"
end,
},
},
},
}
return opts
end,
keys = {
{ "<leader>gc", "<cmd>CodeCompanion /commit<cr>", desc = "AI Generate Commit Message" },
},
}

View File

@ -1,6 +0,0 @@
return {
"catppuccin",
opts = {
transparent_background = true,
},
}

View File

@ -1,14 +0,0 @@
return {
"snacks.nvim",
opts = function(_, opts)
opts.indent.chunk.char = {
-- Benutzt die "Heavy" oder "Rounded" Nerd Font Varianten
corner_top = "",
corner_bottom = "",
horizontal = "",
vertical = "", -- Gestrichelte Linie wirkt weniger erdrückend
arrow = "", -- Ein schöner Nerd-Font Chevron
}
return opts
end,
}

View File

@ -1,4 +0,0 @@
return {
"lsp_signature.nvim",
opts = function(_, opts) opts.hint_enable = true end,
}

View File

@ -1,102 +0,0 @@
-- Hole die Macchiato Palette von Catppuccin
local cp = require("catppuccin.palettes").get_palette "macchiato"
local colors = {
red = cp.red, -- #ed8796
grey = cp.surface2, -- Ein mittleres Grau für die B-Sektion
black = cp.crust, -- Sehr dunkles Grau/Schwarz für die Ränder
white = cp.text, -- Haupttextfarbe
light_green = cp.teal, -- Für den Insert-Modus (etwas frischer)
orange = cp.peach, -- Für den Visual-Modus
green = cp.green, -- Für den Replace-Modus
bg_center = cp.mantle, -- Hintergrund für den mittleren Teil (C)
}
local theme = {
normal = {
a = { fg = cp.base, bg = cp.blue, gui = "bold" }, -- Blau für Normal Mode
b = { fg = colors.white, bg = colors.grey },
c = { fg = colors.white, bg = colors.bg_center },
},
insert = { a = { fg = cp.base, bg = colors.light_green, gui = "bold" } },
visual = { a = { fg = cp.base, bg = colors.orange, gui = "bold" } },
replace = { a = { fg = cp.base, bg = colors.green, gui = "bold" } },
command = { a = { fg = cp.base, bg = cp.yellow, gui = "bold" } },
}
local empty = require("lualine.component"):extend()
function empty:draw(default_highlight)
self.status = ""
self.applied_separator = ""
self:apply_highlights(default_highlight)
self:apply_section_separators()
return self.status
end
-- Hilfsfunktion für die Trenner
local function process_sections(sections)
for name, section in pairs(sections) do
-- Wir nutzen hier cp.mantle für die Lücken, damit es zum Catppuccin-Fluss passt
for pos = #section - 1, 1, -1 do
table.insert(section, pos + 1, { empty, color = { fg = colors.white, bg = cp.mantle } })
end
for id, comp in ipairs(section) do
if type(comp) ~= "table" then
comp = { comp }
section[id] = comp
end
-- Die schrägen Trenner ( und ) bleiben erhalten
local is_left = name:sub(9, 10) < "x"
comp.separator = is_left and { right = "" } or { left = "" }
end
end
return sections
end
-- Deine Hilfsfunktionen bleiben identisch
local function search_result()
if vim.v.hlsearch == 0 then return "" end
local last_search = vim.fn.getreg "/"
if not last_search or last_search == "" then return "" end
local searchcount = vim.fn.searchcount { maxcount = 9999 }
return last_search .. " (" .. searchcount.current .. "/" .. searchcount.total .. ")"
end
local function modified()
if vim.bo.modified then
return "" -- Ein schönerer Punkt für Catppuccin
elseif vim.bo.modifiable == false or vim.bo.readonly == true then
return " 󰌾" -- Ein Schloss-Icon für Readonly
end
return ""
end
-- Rückgabe für das Lualine Setup
return {
"lualine.nvim",
opts = {
options = {
theme = theme,
component_separators = "",
section_separators = { left = "", right = "" },
disabled_filetypes = { "alpha", "dashboard", "NvimTree" },
},
sections = process_sections {
lualine_a = { "mode" },
lualine_b = { "branch", "diff", "diagnostics" },
lualine_c = { "filename", modified },
lualine_x = { search_result, "filetype" },
lualine_y = { "progress" },
lualine_z = { "location" },
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { "filename" },
lualine_x = { "location" },
lualine_y = {},
lualine_z = {},
},
},
}

View File

@ -1,122 +0,0 @@
if true then return {} end
local colors = {
red = "#ca1243",
grey = "#a0a1a7",
black = "#383a42",
white = "#f3f3f3",
light_green = "#83a598",
orange = "#fe8019",
green = "#8ec07c",
}
local theme = {
normal = {
a = { fg = colors.white, bg = colors.black },
b = { fg = colors.white, bg = colors.grey },
c = { fg = colors.black, bg = colors.white },
z = { fg = colors.white, bg = colors.black },
},
insert = { a = { fg = colors.black, bg = colors.light_green } },
visual = { a = { fg = colors.black, bg = colors.orange } },
replace = { a = { fg = colors.black, bg = colors.green } },
}
local empty = require("lualine.component"):extend()
function empty:draw(default_highlight)
self.status = ""
self.applied_separator = ""
self:apply_highlights(default_highlight)
self:apply_section_separators()
return self.status
end
-- Put proper separators and gaps between components in sections
local function process_sections(sections)
for name, section in pairs(sections) do
local left = name:sub(9, 10) < "x"
for pos = 1, name ~= "lualine_z" and #section or #section - 1 do
table.insert(section, pos * 2, { empty, color = { fg = colors.white, bg = colors.white } })
end
for id, comp in ipairs(section) do
if type(comp) ~= "table" then
comp = { comp }
section[id] = comp
end
comp.separator = left and { right = "" } or { left = "" }
end
end
return sections
end
local function search_result()
if vim.v.hlsearch == 0 then return "" end
local last_search = vim.fn.getreg "/"
if not last_search or last_search == "" then return "" end
local searchcount = vim.fn.searchcount { maxcount = 9999 }
return last_search .. "(" .. searchcount.current .. "/" .. searchcount.total .. ")"
end
local function modified()
if vim.bo.modified then
return "+"
elseif vim.bo.modifiable == false or vim.bo.readonly == true then
return "-"
end
return ""
end
-- require("lualine").setup {}
return {
"lualine.nvim",
opts = {
options = {
theme = theme,
component_separators = "",
section_separators = { left = "", right = "" },
},
sections = process_sections {
lualine_a = { "mode" },
lualine_b = {
"branch",
"diff",
{
"diagnostics",
source = { "nvim" },
sections = { "error" },
diagnostics_color = { error = { bg = colors.red, fg = colors.white } },
},
{
"diagnostics",
source = { "nvim" },
sections = { "warn" },
diagnostics_color = { warn = { bg = colors.orange, fg = colors.white } },
},
{ "filename", file_status = false, path = 1 },
{ modified, color = { bg = colors.red } },
{
"%w",
cond = function() return vim.wo.previewwindow end,
},
{
"%r",
cond = function() return vim.bo.readonly end,
},
{
"%q",
cond = function() return vim.bo.buftype == "quickfix" end,
},
},
lualine_c = {},
lualine_x = {},
lualine_y = { search_result, "filetype" },
lualine_z = { "%l:%c", "%p%%/%L" },
},
inactive_sections = {
lualine_c = { "%f %y %m" },
lualine_x = {},
},
},
}

View File

@ -1,28 +0,0 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- Customize Mason
---@type LazySpec
return {
-- use mason-tool-installer for automatically installing Mason packages
{
"WhoIsSethDaniel/mason-tool-installer.nvim",
-- overrides `require("mason-tool-installer").setup(...)`
opts = {
-- Make sure to use the names found in `:Mason`
ensure_installed = {
-- install language servers
"lua-language-server",
-- install formatters
"stylua",
-- install debuggers
"debugpy",
-- install any other package
"tree-sitter-cli",
},
},
},
}

View File

@ -1,8 +0,0 @@
---@type LazySpec
return {
"nvim-neo-tree/neo-tree.nvim",
opts = function(_, opts)
opts.window.mappings["T"] = false
return opts
end,
}

View File

@ -1,24 +0,0 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- Customize None-ls sources
---@type LazySpec
return {
"nvimtools/none-ls.nvim",
opts = function(_, opts)
-- opts variable is the default configuration table for the setup function call
-- local null_ls = require "null-ls"
-- 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/diagnostics
-- 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
-- null_ls.builtins.formatting.stylua,
-- null_ls.builtins.formatting.prettier,
})
end,
}

View File

@ -1,69 +0,0 @@
-- if true then return {} end
return {
"mrcjkb/rustaceanvim",
-- To avoid being surprised by breaking changes,
-- I recommend you set a version range
version = "^9",
-- This plugin implements proper lazy-loading (see :h lua-plugin-lazy).
-- No need for lazy.nvim to lazy-load it.
lazy = false,
}
-- return {
-- "mrcjkb/rustaceanvim",
-- version = "^8",
-- ft = "rust",
-- specs = {
-- {
-- "AstroNvim/astrolsp",
-- optional = true,
-- ---@type AstroLSPOpts
-- opts = {
-- handlers = { rust_analyzer = false }, -- disable setup of `rust_analyzer`
-- },
-- },
-- },
-- opts = function()
-- local adapter
-- local codelldb_installed = pcall(function() return require("mason-registry").get_package "codelldb" end)
-- local cfg = require "rustaceanvim.config"
-- if codelldb_installed then
-- local codelldb_path = vim.fn.exepath "codelldb"
-- local this_os = vim.uv.os_uname().sysname
--
-- local liblldb_path = vim.fn.expand "$MASON/share/lldb"
-- -- The path in windows is different
-- if this_os:find "Windows" then
-- liblldb_path = liblldb_path .. "\\bin\\lldb.dll"
-- else
-- -- The liblldb extension is .so for linux and .dylib for macOS
-- liblldb_path = liblldb_path .. "/lib/liblldb" .. (this_os == "Linux" and ".so" or ".dylib")
-- end
-- adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path)
-- else
-- adapter = cfg.get_codelldb_adapter()
-- end
--
-- local astrolsp_opts = vim.lsp.config["rust_analyzer"] or {}
-- local server = {
-- ---@type table | (fun(project_root:string|nil, default_settings: table|nil):table) -- The rust-analyzer settings or a function that creates them.
-- settings = function(project_root, default_settings)
-- local astrolsp_settings = astrolsp_opts.settings or {}
--
-- local merge_table = require("astrocore").extend_tbl(default_settings or {}, astrolsp_settings)
-- local ra = require "rustaceanvim.config.server"
-- -- load_rust_analyzer_settings merges any found settings with the passed in default settings table and then returns that table
-- return ra.load_rust_analyzer_settings(project_root, {
-- settings_file_pattern = "rust-analyzer.json",
-- default_settings = merge_table,
-- })
-- end,
-- }
-- local final_server = require("astrocore").extend_tbl(astrolsp_opts, server)
-- return {
-- server = final_server,
-- dap = { adapter = adapter, load_rust_types = true },
-- tools = { enable_clippy = false },
-- }
-- end,
-- config = function(_, opts) vim.g.rustaceanvim = require("astrocore").extend_tbl(opts, vim.g.rustaceanvim) end,
-- }

View File

@ -1,34 +0,0 @@
-- if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- Customize Treesitter
-- --------------------
-- Treesitter customizations are handled with AstroCore
-- as nvim-treesitter simply provides a download utility for parsers
---@type LazySpec
return {
"AstroNvim/astrocore",
---@type AstroCoreOpts
opts = {
treesitter = {
enabled = true,
highlight = true, -- enable/disable treesitter based highlighting
indent = true, -- enable/disable treesitter based indentation
auto_install = true, -- enable/disable automatic installation of detected languages
ensure_installed = {
"lua",
"vim",
"vue",
"html",
"css",
"javascript",
"typescript",
"tsx",
"rust",
"ron",
"toml",
-- add more arguments for adding more treesitter parsers
},
},
},
}

View File

@ -1,192 +0,0 @@
-- 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 {
--
-- -- == Examples of Adding Plugins ==
--
-- "andweeb/presence.nvim",
-- {
-- "ray-x/lsp_signature.nvim",
-- event = "BufRead",
-- config = function() require("lsp_signature").setup() 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)
-- require "astronvim.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 "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,
-- },
{
"myakove/homeassistant-nvim",
dependencies = {
"neovim/nvim-lspconfig", -- Required for LSP
"nvim-telescope/telescope.nvim", -- Optional, for entity picker
},
event = { "BufRead", "BufNewFile" }, -- Load on file open
config = function()
require("homeassistant").setup {
lsp = {
enabled = true,
-- LSP server command (default: homeassistant-lsp --stdio)
cmd = { "homeassistant-lsp", "--stdio" },
-- File types to attach LSP to
filetypes = { "yaml", "yaml.homeassistant", "python", "json" },
-- LSP server settings
settings = {
homeassistant = {
host = "ws://192.168.5.249:8123/api/websocket",
token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI0MDVjMjY3NzVlMzk0NDhkOTI0NTE0OWNhOGZmMWIwYiIsImlhdCI6MTc2ODQ3ODYyOSwiZXhwIjoyMDgzODM4NjI5fQ.2-mN42_ebqwo7VPRTqwSb7ieBDboipJbnXea-g7Quro",
timeout = 5000,
},
cache = {
enabled = true,
ttl = 300, -- 5 minutes
},
diagnostics = {
enabled = true,
debounce = 500,
},
},
},
-- Optional: UI settings
-- ui = {
-- dashboard = {
-- width = 0.8,
-- height = 0.8,
-- border = "rounded",
-- },
-- },
-- Optional: Custom keymaps (set to false to disable defaults)
-- keymaps = {
-- dashboard = "<leader>hd",
-- picker = "<leader>hp",
-- reload_cache = "<leader>hr",
-- debug = "<leader>hD",
-- edit_dashboard = "<leader>he",
-- },
}
end,
},
{
"nosduco/remote-sshfs.nvim",
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
opts = {
-- Refer to the configuration section below
-- or leave empty for defaults
},
},
-- 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,
-- },
}

View File

@ -1,20 +0,0 @@
--if true then return {} end
return {
"windows.nvim",
opts = function(_, opts)
opts.autowidth = { enable = true }
return opts
end,
-- event = "WindowsEnableAutoWidth",
dependencies = {
"AstroNvim/astrocore",
opts = {
mappings = {
n = {
["<Leader>W"] = function() vim.cmd "WindowsMaximize" end,
},
},
},
},
}

View File

@ -1,5 +0,0 @@
if true then return end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- This will run last in the setup process.
-- This is just pure lua so anything that doesn't
-- fit in the normal config locations above can go here

View File

@ -1,6 +0,0 @@
---
base: lua51
globals:
vim:
any: true

View File

@ -1,8 +0,0 @@
std = "neovim"
[rules]
global_usage = "allow"
if_same_then_else = "allow"
incorrect_standard_library_use = "allow"
mixed_table = "allow"
multiple_statements = "allow"