-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from mehalter/master
nvim: update to AstroNvim v4
- Loading branch information
Showing
5 changed files
with
118 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"neodev": { | ||
"library": { | ||
"enabled": true, | ||
"plugins": true | ||
} | ||
}, | ||
"neoconf": { | ||
"plugins": { | ||
"lua_ls": { | ||
"enabled": true | ||
} | ||
} | ||
}, | ||
"lspconfig": { | ||
"lua_ls": { | ||
"Lua.format.enable": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
#!/bin/sh | ||
|
||
git clone https://github.com/kabinspace/AstroVim ~/.config/nvim | ||
|
||
mkdir ~/.config/nvim/lua/user | ||
ln -sf ~/dotfiles/nvim/init.lua ~/.config/nvim/lua/user | ||
nvim +PackerSync | ||
ln -sf ~/dotfiles/nvim ~/.config/nvim | ||
nvim --headless +q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,93 @@ | ||
return { | ||
colorscheme = "sonokai", | ||
mappings = { | ||
n = { | ||
["<S-l>"] = { | ||
function() require("astronvim.utils.buffer").nav(vim.v.count > 0 and vim.v.count or 1) end, | ||
desc = "Next buffer", | ||
}, | ||
["<S-h>"] = { | ||
function() require("astronvim.utils.buffer").nav(-(vim.v.count > 0 and vim.v.count or 1)) end, | ||
desc = "Previous buffer", | ||
-- bootstreap lazy package manager | ||
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" | ||
if not (vim.uv or vim.loop).fs_stat(lazypath) then | ||
-- stylua: ignore | ||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) | ||
end | ||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath) | ||
|
||
-- manage plugins | ||
local plugins = { | ||
{ "AstroNvim/AstroNvim", version = "^4", import = "astronvim.plugins" }, | ||
|
||
"AstroNvim/astrocommunity", | ||
{ import = "astrocommunity.pack.cpp" }, | ||
{ import = "astrocommunity.pack.proto" }, | ||
{ import = "astrocommunity.pack.ansible" }, | ||
{ import = "astrocommunity.pack.prisma" }, | ||
{ import = "astrocommunity.pack.markdown" }, | ||
{ import = "astrocommunity.pack.go" }, | ||
{ import = "astrocommunity.pack.json" }, | ||
{ import = "astrocommunity.pack.terraform" }, | ||
{ import = "astrocommunity.pack.lua" }, | ||
{ import = "astrocommunity.pack.rust" }, | ||
{ import = "astrocommunity.pack.python" }, | ||
{ import = "astrocommunity.pack.typescript" }, | ||
{ import = "astrocommunity.pack.bash" }, | ||
|
||
{ | ||
"AstroNvim/astrocore", | ||
---@type AstroCoreOpts | ||
opts = { | ||
mappings = { | ||
n = { | ||
L = { | ||
function() | ||
require("astrocore.buffer").nav(vim.v.count1) | ||
end, | ||
desc = "Next buffer", | ||
}, | ||
H = { | ||
function() | ||
require("astrocore.buffer").nav(-vim.v.count1) | ||
end, | ||
desc = "Previous buffer", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
lsp = { | ||
config = { | ||
clangd = { | ||
capabilities = { | ||
offsetEncoding = "utf-8", | ||
options = { | ||
opt = { | ||
mouse = "", | ||
listchars = { tab = "│→", extends = "⟩", precedes = "⟨", trail = "·", nbsp = "␣" }, | ||
showbreak = "↪ ", | ||
wrap = true, | ||
}, | ||
}, | ||
}, | ||
}, | ||
-- Add plugins | ||
plugins = { | ||
-- { "AstroNvim/astrocommunity", dev = true }, | ||
"AstroNvim/astrocommunity", | ||
{ "20k-ultra/sonokai" }, | ||
{ | ||
"PratikBhusal/vim-grip", | ||
event = "VeryLazy", | ||
{ | ||
"AstroNvim/astroui", | ||
---@type AstroUIOpts | ||
opts = { | ||
colorscheme = "sonokai", | ||
}, | ||
{ | ||
"rebelot/heirline.nvim", | ||
opts = function(_, opts) | ||
local status = require "astronvim.utils.status" | ||
opts.tabline[2] = status.heirline.make_buflist(status.component.tabline_file_info { close_button = false }) | ||
return opts | ||
end, | ||
}, | ||
{ "williamboman/mason.nvim", opts = { PATH = "append" } }, | ||
{ import = "astrocommunity.pack.cpp" }, | ||
{ import = "astrocommunity.pack.proto" }, | ||
{ import = "astrocommunity.pack.ansible" }, | ||
{ import = "astrocommunity.pack.prisma" }, | ||
{ import = "astrocommunity.pack.markdown" }, | ||
{ import = "astrocommunity.pack.go" }, | ||
{ import = "astrocommunity.pack.json" }, | ||
{ import = "astrocommunity.pack.terraform" }, | ||
{ import = "astrocommunity.pack.lua" }, | ||
{ import = "astrocommunity.pack.rust" }, | ||
{ import = "astrocommunity.pack.python" }, | ||
{ import = "astrocommunity.pack.typescript" }, | ||
{ import = "astrocommunity.pack.bash" }, | ||
}, | ||
options = { | ||
opt = { | ||
mouse = "", | ||
list = false, | ||
listchars = { | ||
tab = "│→", | ||
extends = "⟩", | ||
precedes = "⟨", | ||
trail = "·", | ||
nbsp = "␣", | ||
|
||
{ "20k-ultra/sonokai" }, | ||
{ "PratikBhusal/vim-grip", event = "VeryLazy" }, | ||
{ "williamboman/mason.nvim", opts = { PATH = "append" } }, | ||
{ | ||
"rebelot/heirline.nvim", | ||
opts = function(_, opts) | ||
local status = require "astroui.status" | ||
opts.tabline[2] = status.heirline.make_buflist(status.component.tabline_file_info { close_button = false }) | ||
end, | ||
}, | ||
} | ||
|
||
-- initialize lazy | ||
require("lazy").setup { | ||
spec = plugins, | ||
ui = { backdrop = 100 }, | ||
performance = { | ||
rtp = { | ||
disabled_plugins = { | ||
"gzip", | ||
"netrwPlugin", | ||
"tarPlugin", | ||
"tohtml", | ||
"zipPlugin", | ||
}, | ||
showbreak = "↪ ", | ||
wrap = true, | ||
linebreak = true, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
base: lua51 | ||
|
||
globals: | ||
vim: | ||
any: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |