nvim config updated
This commit is contained in:
2
.config/nvim/.gitignore
vendored
2
.config/nvim/.gitignore
vendored
@@ -1,2 +0,0 @@
|
|||||||
lazy-lock.json
|
|
||||||
|
|
||||||
20
.config/nvim/.neoconf.json
Normal file
20
.config/nvim/.neoconf.json
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"neodev": {
|
||||||
|
"library": {
|
||||||
|
"enabled": true,
|
||||||
|
"plugins": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"neoconf": {
|
||||||
|
"plugins": {
|
||||||
|
"lua_ls": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lspconfig": {
|
||||||
|
"lua_ls": {
|
||||||
|
"Lua.format.enable": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
.config/nvim/.stylua.toml
Normal file
7
.config/nvim/.stylua.toml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
column_width = 120
|
||||||
|
line_endings = "Unix"
|
||||||
|
indent_type = "Spaces"
|
||||||
|
indent_width = 2
|
||||||
|
quote_style = "AutoPreferDouble"
|
||||||
|
call_parentheses = "None"
|
||||||
|
collapse_simple_statement = "Always"
|
||||||
41
.config/nvim/README.md
Normal file
41
.config/nvim/README.md
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# AstroNvim Template
|
||||||
|
|
||||||
|
**NOTE:** This is for AstroNvim v4+
|
||||||
|
|
||||||
|
A template for getting started with [AstroNvim](https://github.com/AstroNvim/AstroNvim)
|
||||||
|
|
||||||
|
## System dependencies
|
||||||
|
- `lazygit` for lazygit integration
|
||||||
|
- `typescript-language-server` and `typescript` installed globally from npm
|
||||||
|
```bash
|
||||||
|
npm install -g typescript-language-server typescript
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🛠️ Installation
|
||||||
|
|
||||||
|
#### Make a backup of your current nvim and shared folder
|
||||||
|
|
||||||
|
```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
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Create a new user repository from this template
|
||||||
|
|
||||||
|
Press the "Use this template" button above to create a new repository to store your user configuration.
|
||||||
|
|
||||||
|
You can also just clone this repository directly if you do not want to track your user configuration in GitHub.
|
||||||
|
|
||||||
|
#### Clone the repository
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://github.com/<your_user>/<your_repository> ~/.config/nvim
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Start Neovim
|
||||||
|
|
||||||
|
```shell
|
||||||
|
nvim
|
||||||
|
```
|
||||||
@@ -1,20 +1,20 @@
|
|||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
-- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
-- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk.
|
||||||
vim.fn.system({
|
local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
||||||
"git",
|
if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then
|
||||||
"clone",
|
-- stylua: ignore
|
||||||
"--filter=blob:none",
|
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
|
||||||
"--branch=stable", -- latest stable release
|
|
||||||
lazypath,
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
vim.g.mapleader = ' '
|
-- validate that lazy is available
|
||||||
vim.g.maplocalleader = ' '
|
if not pcall(require, "lazy") then
|
||||||
|
-- stylua: ignore
|
||||||
require('lazy').setup('plugins')
|
vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
|
||||||
require('config')
|
vim.fn.getchar()
|
||||||
require('completion')
|
vim.cmd.quit()
|
||||||
|
end
|
||||||
|
|
||||||
|
require "lazy_setup"
|
||||||
|
require "polish"
|
||||||
|
require "autocmds"
|
||||||
|
|||||||
68
.config/nvim/lazy-lock.json
Normal file
68
.config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
"AstroNvim": { "branch": "main", "commit": "c5e610f614e74c9dd9bf11760c4d0ad2c98c0abe" },
|
||||||
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
|
||||||
|
"aerial.nvim": { "branch": "master", "commit": "6ab1a0ce4874d21610fc5a67a6c82c7b943c635b" },
|
||||||
|
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
|
||||||
|
"astrocommunity": { "branch": "main", "commit": "d451f1d8e90e21c0cad730add858d8f952c66f01" },
|
||||||
|
"astrocore": { "branch": "main", "commit": "44a3dc0bf1591022b2a6bc89dccdfac1be17bec9" },
|
||||||
|
"astrolsp": { "branch": "main", "commit": "909fbe64f3f87d089ff3777751261544557117cc" },
|
||||||
|
"astrotheme": { "branch": "main", "commit": "4a2af93815e4e6adfe69c836e46047a9451de858" },
|
||||||
|
"astroui": { "branch": "main", "commit": "e923a84c488d879a260fc9cfb2dc27dd870fb6ac" },
|
||||||
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
|
"cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
|
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" },
|
||||||
|
"flutter-tools.nvim": { "branch": "main", "commit": "6faf2c70bd56f1fe78620591a2bb73f4dc6f4870" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" },
|
||||||
|
"guess-indent.nvim": { "branch": "main", "commit": "6cd61f7a600bb756e558627cd2e740302c58e32d" },
|
||||||
|
"heirline.nvim": { "branch": "master", "commit": "fae936abb5e0345b85c3a03ecf38525b0828b992" },
|
||||||
|
"hover.nvim": { "branch": "main", "commit": "3b49066e09e03e63be6d6f43ae2b8bcd58301f63" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" },
|
||||||
|
"lsp_signature.nvim": { "branch": "master", "commit": "a793d02b6a5e639fa9d3f2a89a839fa688ab2d0a" },
|
||||||
|
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||||
|
"mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" },
|
||||||
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||||
|
"mini.animate": { "branch": "main", "commit": "8ce6df739aa9d14c876bace722af28c3d09e9971" },
|
||||||
|
"mini.bufremove": { "branch": "main", "commit": "285bdac9596ee7375db50c0f76ed04336dcd2685" },
|
||||||
|
"neo-tree.nvim": { "branch": "main", "commit": "c4c168e459395275c552179a1baf9c3d885d6a74" },
|
||||||
|
"neoconf.nvim": { "branch": "main", "commit": "f630568a4d04154803886f21ca60923f12709f0f" },
|
||||||
|
"none-ls.nvim": { "branch": "main", "commit": "a117163db44c256d53c3be8717f3e1a2a28e6299" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" },
|
||||||
|
"nvim-autopairs": { "branch": "master", "commit": "68f0e5c3dab23261a945272032ee6700af86227a" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" },
|
||||||
|
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
|
||||||
|
"nvim-dap": { "branch": "master", "commit": "6a5bba0ddea5d419a783e170c20988046376090d" },
|
||||||
|
"nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "185b2af444b27d6541c02d662b5b68190e5cf0c4" },
|
||||||
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
|
"nvim-notify": { "branch": "master", "commit": "a3020c2cf4dfc4c4f390c4a21e84e35e46cf5d17" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "f8aaf5ce4e27cd20de917946b2ae5c968a2c2858" },
|
||||||
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" },
|
||||||
|
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||||
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
||||||
|
"nvim-ufo": { "branch": "main", "commit": "61463090a4f55f5d080236ea62f09d1cd8976ff3" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
|
||||||
|
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
|
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
||||||
|
"promise-async": { "branch": "main", "commit": "38a4575da9497326badd3995e768b4ccf0bb153e" },
|
||||||
|
"resession.nvim": { "branch": "master", "commit": "cc819b0489938d03e4f3532a583354f0287c015b" },
|
||||||
|
"schemastore.nvim": { "branch": "main", "commit": "960a5cf992c033170499ccc7003df59734ed40a8" },
|
||||||
|
"smart-splits.nvim": { "branch": "master", "commit": "ddb23c1a1cf1507bda487cda7f6e4690965ef9f5" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "a17d611a0e111836a1db5295f04945df407c5135" },
|
||||||
|
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||||
|
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "c098362fe603d3922095e7db595961e020bdf2d0" },
|
||||||
|
"vim-illuminate": { "branch": "master", "commit": "19cb21f513fc2b02f0c66be70107741e837516a1" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" },
|
||||||
|
"zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" }
|
||||||
|
}
|
||||||
21
.config/nvim/lua/autocmds.lua
Normal file
21
.config/nvim/lua/autocmds.lua
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
-- Autocommand: trigger Flutter hot reload on save
|
||||||
|
--
|
||||||
|
-- This runs whenever you save a *.dart file (BufWritePost).
|
||||||
|
-- It checks if a tmux session named "flutter" exists.
|
||||||
|
-- If it does, it sends the keys "r<Enter>" to the "app" window
|
||||||
|
-- of that session, which tells `flutter run` to hot-reload.
|
||||||
|
--
|
||||||
|
-- Workflow:
|
||||||
|
-- 1. Start tmux: tmux new -s flutter -n app
|
||||||
|
-- 2. Inside tmux "app" window, run: flutter run
|
||||||
|
-- 3. Open another window/pane for nvim.
|
||||||
|
-- 4. Whenever you :w a Dart file in nvim, hot reload will fire.
|
||||||
|
--
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
|
pattern = "*.dart",
|
||||||
|
callback = function()
|
||||||
|
local result = vim.fn.system({ "tmux", "send-keys", "-t", "flutter:app", "r", "Enter" })
|
||||||
|
vim.notify("Flutter hot reload triggered", vim.log.levels.INFO)
|
||||||
|
end,
|
||||||
|
})
|
||||||
13
.config/nvim/lua/community.lua
Normal file
13
.config/nvim/lua/community.lua
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
-- 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",
|
||||||
|
{ import = "astrocommunity.pack.lua" },
|
||||||
|
-- import/override with your plugins folder
|
||||||
|
{ import = "astrocommunity.utility.hover-nvim" },
|
||||||
|
{ import = "astrocommunity.diagnostics.trouble-nvim" },
|
||||||
|
{ import = "astrocommunity.scrolling.mini-animate" },
|
||||||
|
}
|
||||||
@@ -1,128 +0,0 @@
|
|||||||
local cmp_status_ok, cmp = pcall(require, "cmp")
|
|
||||||
if not cmp_status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local snip_status_ok, luasnip = pcall(require, "luasnip")
|
|
||||||
if not snip_status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
require("luasnip/loaders/from_vscode").lazy_load()
|
|
||||||
|
|
||||||
local check_backspace = function()
|
|
||||||
local col = vim.fn.col "." - 1
|
|
||||||
return col == 0 or vim.fn.getline("."):sub(col, col):match "%s"
|
|
||||||
end
|
|
||||||
|
|
||||||
-- פּ ﯟ some other good icons
|
|
||||||
local kind_icons = {
|
|
||||||
Text = "",
|
|
||||||
Method = "m",
|
|
||||||
Function = "",
|
|
||||||
Constructor = "",
|
|
||||||
Field = "",
|
|
||||||
Variable = "",
|
|
||||||
Class = "",
|
|
||||||
Interface = "",
|
|
||||||
Module = "",
|
|
||||||
Property = "",
|
|
||||||
Unit = "",
|
|
||||||
Value = "",
|
|
||||||
Enum = "",
|
|
||||||
Keyword = "",
|
|
||||||
Snippet = "",
|
|
||||||
Color = "",
|
|
||||||
File = "",
|
|
||||||
Reference = "",
|
|
||||||
Folder = "",
|
|
||||||
EnumMember = "",
|
|
||||||
Constant = "",
|
|
||||||
Struct = "",
|
|
||||||
Event = "",
|
|
||||||
Operator = "",
|
|
||||||
TypeParameter = "",
|
|
||||||
}
|
|
||||||
-- find more here: https://www.nerdfonts.com/cheat-sheet
|
|
||||||
|
|
||||||
cmp.setup {
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body) -- For `luasnip` users.
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = {
|
|
||||||
["<C-k>"] = cmp.mapping.select_prev_item(),
|
|
||||||
["<C-j>"] = cmp.mapping.select_next_item(),
|
|
||||||
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
|
|
||||||
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
|
|
||||||
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
|
|
||||||
["<C-y>"] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
|
|
||||||
["<C-e>"] = cmp.mapping {
|
|
||||||
i = cmp.mapping.abort(),
|
|
||||||
c = cmp.mapping.close(),
|
|
||||||
},
|
|
||||||
-- Accept currently selected item. If none selected, `select` first item.
|
|
||||||
-- Set `select` to `false` to only confirm explicitly selected items.
|
|
||||||
["<CR>"] = cmp.mapping.confirm { select = false },
|
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif luasnip.expandable() then
|
|
||||||
luasnip.expand()
|
|
||||||
elseif luasnip.expand_or_jumpable() then
|
|
||||||
luasnip.expand_or_jump()
|
|
||||||
elseif check_backspace() then
|
|
||||||
fallback()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
"i",
|
|
||||||
"s",
|
|
||||||
}),
|
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif luasnip.jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
"i",
|
|
||||||
"s",
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
formatting = {
|
|
||||||
fields = { "kind", "abbr", "menu" },
|
|
||||||
format = function(entry, vim_item)
|
|
||||||
-- Kind icons
|
|
||||||
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
|
|
||||||
-- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind
|
|
||||||
vim_item.menu = ({
|
|
||||||
luasnip = "[Snippet]",
|
|
||||||
buffer = "[Buffer]",
|
|
||||||
path = "[Path]",
|
|
||||||
})[entry.source.name]
|
|
||||||
return vim_item
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
{ name = "luasnip" },
|
|
||||||
{ name = "buffer" },
|
|
||||||
{ name = "path" },
|
|
||||||
},
|
|
||||||
confirm_opts = {
|
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
|
||||||
select = false,
|
|
||||||
},
|
|
||||||
-- documentation = {
|
|
||||||
-- border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
|
|
||||||
-- },
|
|
||||||
-- experimental = {
|
|
||||||
-- ghost_text = false,
|
|
||||||
-- native_menu = false,
|
|
||||||
-- },
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
local set = vim.opt
|
|
||||||
|
|
||||||
set.mouse = 'a'
|
|
||||||
set.encoding = 'UTF-8'
|
|
||||||
set.fileencoding = 'UTF-8'
|
|
||||||
|
|
||||||
set.number = true
|
|
||||||
set.relativenumber = true
|
|
||||||
set.showcmd = true
|
|
||||||
vim.o.syntax = true
|
|
||||||
|
|
||||||
set.ignorecase = true
|
|
||||||
set.smartcase = true
|
|
||||||
|
|
||||||
set.cursorline = true
|
|
||||||
-- bold line number at cursor
|
|
||||||
vim.cmd [[ highlight CursorLineNr cterm=bold ]]
|
|
||||||
|
|
||||||
set.linebreak = true
|
|
||||||
|
|
||||||
-- special characters
|
|
||||||
set.list = true
|
|
||||||
set.listchars = 'tab:→ ,eol:↲,nbsp:␣,trail:•,extends:⟩,precedes:⟨'
|
|
||||||
|
|
||||||
set.tabstop = 4
|
|
||||||
set.shiftwidth = 4
|
|
||||||
vim.o.expandtab = false
|
|
||||||
vim.o.smartindent = true
|
|
||||||
|
|
||||||
set.swapfile = false
|
|
||||||
|
|
||||||
-- spellcheck (enable with `set spell`)
|
|
||||||
vim.o.spelllang = 'cs,en_gb'
|
|
||||||
vim.cmd [[ hi SpellBad cterm=bold ctermbg=red ctermfg=white ]]
|
|
||||||
|
|
||||||
-- cursor padding from top and bottom
|
|
||||||
vim.o.scrolloff = 5
|
|
||||||
|
|
||||||
-- better navigation in split windows
|
|
||||||
vim.keymap.set('n', '<C-h>', '<C-w>h')
|
|
||||||
vim.keymap.set('n', '<C-j>', '<C-w>j')
|
|
||||||
vim.keymap.set('n', '<C-k>', '<C-w>k')
|
|
||||||
vim.keymap.set('n', '<C-h>', '<C-w>l')
|
|
||||||
|
|
||||||
-- colorscheme
|
|
||||||
vim.cmd [[ color base16-default-dark ]]
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
vim.o.tabstop = 2
|
|
||||||
vim.o.softtabstop = 2
|
|
||||||
vim.o.shiftwidth = 2
|
|
||||||
vim.o.expandtab = true
|
|
||||||
|
|
||||||
32
.config/nvim/lua/lazy_setup.lua
Normal file
32
.config/nvim/lua/lazy_setup.lua
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
require("lazy").setup({
|
||||||
|
{
|
||||||
|
"AstroNvim/AstroNvim",
|
||||||
|
version = "^4", -- 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" } },
|
||||||
|
ui = { backdrop = 100 },
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
-- disable some rtp plugins, add more to your liking
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
"netrwPlugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} --[[@as LazyConfig]])
|
||||||
71
.config/nvim/lua/plugins/astrocore.lua
Normal file
71
.config/nvim/lua/plugins/astrocore.lua
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
-- 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_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on)
|
||||||
|
highlighturl = true, -- highlight URLs at start
|
||||||
|
notifications = true, -- enable notifications at start
|
||||||
|
},
|
||||||
|
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
-- 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
|
||||||
|
scrolloff = 8,
|
||||||
|
},
|
||||||
|
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(
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
104
.config/nvim/lua/plugins/astrolsp.lua
Normal file
104
.config/nvim/lua/plugins/astrolsp.lua
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
-- 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 = {
|
||||||
|
-- Configuration table of features provided by AstroLSP
|
||||||
|
features = {
|
||||||
|
codelens = true, -- enable/disable codelens refresh on start
|
||||||
|
inlay_hints = false, -- enable/disable inlay hints on start
|
||||||
|
semantic_tokens = true, -- enable/disable semantic token highlighting
|
||||||
|
},
|
||||||
|
-- customize lsp formatting options
|
||||||
|
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",
|
||||||
|
},
|
||||||
|
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 options passed to `lspconfig`
|
||||||
|
---@diagnostic disable: missing-fields
|
||||||
|
config = {
|
||||||
|
ts_ls = {},
|
||||||
|
-- clangd = { capabilities = { offsetEncoding = "utf-8" } },
|
||||||
|
},
|
||||||
|
-- customize how language servers are attached
|
||||||
|
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
|
||||||
|
-- function(server, opts) require("lspconfig")[server].setup(opts) end
|
||||||
|
|
||||||
|
-- the key is the server that is being setup with `lspconfig`
|
||||||
|
-- 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
|
||||||
|
},
|
||||||
|
-- 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 lspconfig-setup`)
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
-- this would disable semanticTokensProvider for all clients
|
||||||
|
-- client.server_capabilities.semanticTokensProvider = nil
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
39
.config/nvim/lua/plugins/astroui.lua
Normal file
39
.config/nvim/lua/plugins/astroui.lua
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||||
|
|
||||||
|
-- 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 = "astrodark",
|
||||||
|
-- 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 = "⠏",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
return {
|
|
||||||
'windwp/nvim-autopairs',
|
|
||||||
config = function() require("nvim-autopairs").setup {} end
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
'akinsho/bufferline.nvim',
|
|
||||||
config = function()
|
|
||||||
vim.opt.termguicolors = true
|
|
||||||
require("bufferline").setup{}
|
|
||||||
end
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
11
.config/nvim/lua/plugins/flutter.lua
Normal file
11
.config/nvim/lua/plugins/flutter.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
return {
|
||||||
|
-- Add the community repository of plugin specifications
|
||||||
|
"AstroNvim/astrocommunity",
|
||||||
|
{ import = "astrocommunity.pack.dart" },
|
||||||
|
-- Configure flutter-tools
|
||||||
|
{ "akinsho/flutter-tools.nvim",
|
||||||
|
opts = {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
'f-person/git-blame.nvim',
|
|
||||||
config = function()
|
|
||||||
vim.g.gitblame_date_format = '%r'
|
|
||||||
vim.g.gitblame_message_when_not_committed = ''
|
|
||||||
vim.g.gitblame_display_virtual_text = 0
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'lewis6991/gitsigns.nvim',
|
|
||||||
config = function()
|
|
||||||
require('gitsigns').setup()
|
|
||||||
end
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
return {
|
|
||||||
'RRethy/nvim-base16',
|
|
||||||
'tpope/vim-commentary',
|
|
||||||
|
|
||||||
-- completion
|
|
||||||
'hrsh7th/nvim-cmp',
|
|
||||||
'hrsh7th/cmp-buffer',
|
|
||||||
'hrsh7th/cmp-path',
|
|
||||||
'hrsh7th/cmp-cmdline',
|
|
||||||
'saadparwaiz1/cmp_luasnip',
|
|
||||||
|
|
||||||
-- snippets
|
|
||||||
'L3MON4D3/LuaSnip',
|
|
||||||
'rafamadriz/friendly-snippets',
|
|
||||||
|
|
||||||
-- emmet
|
|
||||||
'mattn/emmet-vim',
|
|
||||||
|
|
||||||
-- LSP
|
|
||||||
'neovim/nvim-lspconfig',
|
|
||||||
|
|
||||||
-- LSP, DAP, linters and formatters
|
|
||||||
-- 'jose-elias-alvarez/null-ls.nvim',
|
|
||||||
{
|
|
||||||
'dense-analysis/ale',
|
|
||||||
config = function()
|
|
||||||
vim.cmd [[ g:ale_sign_column_always = 1 ]]
|
|
||||||
end
|
|
||||||
},
|
|
||||||
|
|
||||||
-- management for LSP, DAP, linters and formatters
|
|
||||||
{
|
|
||||||
'williamboman/mason.nvim',
|
|
||||||
config = function()
|
|
||||||
require('mason').setup({
|
|
||||||
ui = {
|
|
||||||
icons = {
|
|
||||||
package_installed = "✓",
|
|
||||||
package_pending = "➜",
|
|
||||||
package_uninstalled = "✗"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
},
|
|
||||||
'williamboman/mason-lspconfig.nvim',
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
return {
|
|
||||||
'nvim-lualine/lualine.nvim',
|
|
||||||
dependencies = { 'kyazdani42/nvim-web-devicons', lazy = true },
|
|
||||||
config = function()
|
|
||||||
local git_blame = require('gitblame')
|
|
||||||
require('lualine').setup({
|
|
||||||
sections = {
|
|
||||||
lualine_c = {
|
|
||||||
{ git_blame.get_current_blame_text, cond = git_blame.is_blame_text_available }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
vim.o.showmode = false
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
37
.config/nvim/lua/plugins/mason.lua
Normal file
37
.config/nvim/lua/plugins/mason.lua
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
-- Customize Mason plugins
|
||||||
|
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
-- use mason-lspconfig to configure LSP installations
|
||||||
|
{
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
-- overrides `require("mason-lspconfig").setup(...)`
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"lua_ls",
|
||||||
|
-- add more arguments for adding more language servers
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- 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 = {
|
||||||
|
"stylua",
|
||||||
|
-- add more arguments for adding more null-ls sources
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"jay-babu/mason-nvim-dap.nvim",
|
||||||
|
-- overrides `require("mason-nvim-dap").setup(...)`
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"python",
|
||||||
|
-- add more arguments for adding more debuggers
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
return {
|
|
||||||
'nvim-neo-tree/neo-tree.nvim',
|
|
||||||
cmd = 'Neotree',
|
|
||||||
branch = 'v2.x',
|
|
||||||
keys = {
|
|
||||||
{ '<leader>ft', '<cmd>Neotree toggle<cr>', desc = 'NeoTree' },
|
|
||||||
},
|
|
||||||
dependencies = {
|
|
||||||
'nvim-lua/plenary.nvim',
|
|
||||||
'MunifTanjim/nui.nvim',
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
filesystem = {
|
|
||||||
follow_current_file = true,
|
|
||||||
hijack_netrw_behavior = 'open_current',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
15
.config/nvim/lua/plugins/treesitter.lua
Normal file
15
.config/nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||||
|
|
||||||
|
-- Customize Treesitter
|
||||||
|
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"lua",
|
||||||
|
"vim",
|
||||||
|
-- add more arguments for adding more treesitter parsers
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
83
.config/nvim/lua/plugins/user.lua
Normal file
83
.config/nvim/lua/plugins/user.lua
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
-- You can also add or configure plugins by creating files in this `plugins/` folder
|
||||||
|
-- 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 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 "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,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
"folke/which-key.nvim",
|
|
||||||
config = function()
|
|
||||||
vim.o.timeout = true
|
|
||||||
vim.o.timeoutlen = 300
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,29 +1,10 @@
|
|||||||
return {
|
return {
|
||||||
'folke/zen-mode.nvim',
|
{
|
||||||
config = {
|
"folke/zen-mode.nvim",
|
||||||
window = {
|
|
||||||
backdrop = 1,
|
|
||||||
width = 80,
|
|
||||||
height = .9,
|
|
||||||
options = {
|
|
||||||
signcolumn = "no",
|
|
||||||
number = false,
|
|
||||||
relativenumber = false,
|
|
||||||
cursorline = false,
|
|
||||||
cursorcolumn = false,
|
|
||||||
foldcolumn = "0",
|
|
||||||
list = false,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
opts = {
|
opts = {
|
||||||
alacritty = {
|
-- your configuration comes here
|
||||||
enabled = true,
|
-- or leave it empty to use the default settings
|
||||||
font = "13",
|
-- refer to the configuration section below
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ '<leader>fg', '<cmd>ZenMode<cr>', desc = 'Zen Mode' },
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
18
.config/nvim/lua/polish.lua
Normal file
18
.config/nvim/lua/polish.lua
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
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
|
||||||
|
-- things like custom filetypes. This is just pure lua so anything that doesn't
|
||||||
|
-- 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",
|
||||||
|
},
|
||||||
|
}
|
||||||
6
.config/nvim/neovim.yml
Normal file
6
.config/nvim/neovim.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
base: lua51
|
||||||
|
|
||||||
|
globals:
|
||||||
|
vim:
|
||||||
|
any: true
|
||||||
8
.config/nvim/selene.toml
Normal file
8
.config/nvim/selene.toml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
std = "neovim"
|
||||||
|
|
||||||
|
[rules]
|
||||||
|
global_usage = "allow"
|
||||||
|
if_same_then_else = "allow"
|
||||||
|
incorrect_standard_library_use = "allow"
|
||||||
|
mixed_table = "allow"
|
||||||
|
multiple_statements = "allow"
|
||||||
Reference in New Issue
Block a user