chore(neovim): format
This commit is contained in:
parent
4044df17c2
commit
f6051a1f29
|
@ -11,8 +11,8 @@ vim.opt.rtp:prepend(lazypath)
|
||||||
if not pcall(require, "lazy") then
|
if not pcall(require, "lazy") then
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
|
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.fn.getchar()
|
||||||
vim.cmd.quit()
|
vim.cmd.quit()
|
||||||
end
|
end
|
||||||
|
|
||||||
require "lazy_setup"
|
require "lazy_setup"
|
||||||
|
|
|
@ -3,8 +3,8 @@ require("lazy").setup({
|
||||||
"AstroNvim/AstroNvim",
|
"AstroNvim/AstroNvim",
|
||||||
--version = "^4", -- Remove version tracking to elect for nighly AstroNvim
|
--version = "^4", -- Remove version tracking to elect for nighly AstroNvim
|
||||||
import = "astronvim.plugins",
|
import = "astronvim.plugins",
|
||||||
opts = { -- AstroNvim options must be set here with the `import` key
|
opts = { -- AstroNvim options must be set here with the `import` key
|
||||||
mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
|
mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
|
||||||
maplocalleader = ",", -- This ensures the localleader 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)
|
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
|
pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override
|
||||||
|
|
|
@ -11,11 +11,11 @@ return {
|
||||||
-- Configure core features of AstroNvim
|
-- Configure core features of AstroNvim
|
||||||
features = {
|
features = {
|
||||||
large_buf = { size = 1024 * 500, lines = 10000 }, -- set global limits for large files for disabling features like treesitter
|
large_buf = { size = 1024 * 500, lines = 10000 }, -- set global limits for large files for disabling features like treesitter
|
||||||
autopairs = true, -- enable autopairs at start
|
autopairs = true, -- enable autopairs at start
|
||||||
cmp = true, -- enable completion at start
|
cmp = true, -- enable completion at start
|
||||||
diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on)
|
diagnostics_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
|
highlighturl = true, -- highlight URLs at start
|
||||||
notifications = true, -- enable notifications at start
|
notifications = true, -- enable notifications at start
|
||||||
},
|
},
|
||||||
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
|
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
|
@ -24,20 +24,20 @@ return {
|
||||||
},
|
},
|
||||||
-- vim options can be configured here
|
-- vim options can be configured here
|
||||||
options = {
|
options = {
|
||||||
opt = { -- vim.opt.<key>
|
opt = { -- vim.opt.<key>
|
||||||
autoindent = true, -- indents automatically based on context
|
autoindent = true, -- indents automatically based on context
|
||||||
expandtab = true, -- use spaces instead of tabs
|
expandtab = true, -- use spaces instead of tabs
|
||||||
grepprg = "rg --vimgrep", -- use ripgrep on grep actions
|
grepprg = "rg --vimgrep", -- use ripgrep on grep actions
|
||||||
number = true, -- sets vim.opt.number
|
number = true, -- sets vim.opt.number
|
||||||
relativenumber = true, -- sets vim.opt.relativenumber
|
relativenumber = true, -- sets vim.opt.relativenumber
|
||||||
shiftwidth = 2, -- how many spaces after indentation
|
shiftwidth = 2, -- how many spaces after indentation
|
||||||
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
|
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
|
||||||
smartindent = true, -- smartly indent
|
smartindent = true, -- smartly indent
|
||||||
spell = false, -- sets vim.opt.spell
|
spell = false, -- sets vim.opt.spell
|
||||||
tabstop = 2, -- how many spaces to indent when pressing tab
|
tabstop = 2, -- how many spaces to indent when pressing tab
|
||||||
wrap = false, -- sets vim.opt.wrap
|
wrap = false, -- sets vim.opt.wrap
|
||||||
},
|
},
|
||||||
g = { -- vim.g.<key>
|
g = { -- vim.g.<key>
|
||||||
-- configure global vim variables (vim.g)
|
-- configure global vim variables (vim.g)
|
||||||
-- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup`
|
-- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup`
|
||||||
-- This can be found in the `lua/lazy_setup.lua` file
|
-- This can be found in the `lua/lazy_setup.lua` file
|
||||||
|
|
|
@ -9,7 +9,7 @@ return {
|
||||||
}
|
}
|
||||||
|
|
||||||
local function handleFallbackException(bufnr, err, providerName)
|
local function handleFallbackException(bufnr, err, providerName)
|
||||||
if type(err) == "string" and err:match("UfoFallbackException") then
|
if type(err) == "string" and err:match "UfoFallbackException" then
|
||||||
return require("ufo").getFolds(bufnr, providerName)
|
return require("ufo").getFolds(bufnr, providerName)
|
||||||
else
|
else
|
||||||
return require("promise").reject(err)
|
return require("promise").reject(err)
|
||||||
|
|
|
@ -2,57 +2,57 @@
|
||||||
|
|
||||||
---@type LazySpec
|
---@type LazySpec
|
||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
---@param _ LazyPlugin
|
---@param _ LazyPlugin
|
||||||
---@param opts TSConfig
|
---@param opts TSConfig
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
-- disable automatically installing parsers
|
-- disable automatically installing parsers
|
||||||
opts.auto_install = false
|
opts.auto_install = false
|
||||||
|
|
||||||
-- add more things to the ensure_installed table protecting against community packs modifying it
|
-- add more things to the ensure_installed table protecting against community packs modifying it
|
||||||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed --[[@as string[]], {
|
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed --[[@as string[]], {
|
||||||
-- Programming
|
-- Programming
|
||||||
"c",
|
"c",
|
||||||
"c_sharp",
|
"c_sharp",
|
||||||
"cmake",
|
"cmake",
|
||||||
"cpp",
|
"cpp",
|
||||||
"css",
|
"css",
|
||||||
"gdscript",
|
"gdscript",
|
||||||
"godot_resource",
|
"godot_resource",
|
||||||
"html",
|
"html",
|
||||||
"hyprlang",
|
"hyprlang",
|
||||||
"javascript",
|
"javascript",
|
||||||
"jsdoc",
|
"jsdoc",
|
||||||
"lua",
|
"lua",
|
||||||
"nim",
|
"nim",
|
||||||
"nim_format_string",
|
"nim_format_string",
|
||||||
"objc",
|
"objc",
|
||||||
"proto",
|
"proto",
|
||||||
"python",
|
"python",
|
||||||
"razor",
|
"razor",
|
||||||
"svelte",
|
"svelte",
|
||||||
"tsx",
|
"tsx",
|
||||||
"typescript",
|
"typescript",
|
||||||
"vue",
|
"vue",
|
||||||
-- Scripting
|
-- Scripting
|
||||||
"bash",
|
"bash",
|
||||||
"fish",
|
"fish",
|
||||||
"glsl",
|
"glsl",
|
||||||
-- Configuring
|
-- Configuring
|
||||||
"dockerfile",
|
"dockerfile",
|
||||||
"json",
|
"json",
|
||||||
"jsonc",
|
"jsonc",
|
||||||
"nix",
|
"nix",
|
||||||
"vhs",
|
"vhs",
|
||||||
"yaml",
|
"yaml",
|
||||||
-- Misc
|
-- Misc
|
||||||
"cuda",
|
"cuda",
|
||||||
"markdown",
|
"markdown",
|
||||||
"markdown_inline",
|
"markdown_inline",
|
||||||
"query",
|
"query",
|
||||||
-- VIM
|
-- VIM
|
||||||
"vim",
|
"vim",
|
||||||
"vimdoc",
|
"vimdoc",
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue