update astronvim
This commit is contained in:
parent
16999e844b
commit
0ee192c8fc
7 changed files with 90 additions and 39 deletions
|
@ -3,55 +3,55 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
deps=(
|
deps=(
|
||||||
rg # ripgrep
|
rg # ripgrep
|
||||||
lazygit
|
lazygit
|
||||||
gdu
|
gdu
|
||||||
btm # bottom
|
btm # bottom
|
||||||
python
|
python
|
||||||
node
|
node
|
||||||
tree-sitter
|
tree-sitter
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: make sure tree-sitter is rust version?
|
# TODO: make sure tree-sitter is rust version?
|
||||||
|
|
||||||
is-cmd() {
|
is-cmd() {
|
||||||
if [ -x "$(command -v "$1")" ]; then
|
if [ -x "$(command -v "$1")" ]; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install-astronvim(){
|
install-astronvim() {
|
||||||
echo "Installing astronvim"
|
echo "Installing astronvim"
|
||||||
|
|
||||||
if [[ -d ~/.config/nvim ]]; then
|
if [[ -d ~/.config/nvim ]]; then
|
||||||
echo "backing up old nvim config"
|
echo "backing up old nvim config"
|
||||||
mv ~/.config/nvim ~/.config/nvim.bak-$(date +'%s')
|
mv ~/.config/nvim ~/.config/nvim.bak-"$(date +'%s')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d ~/.local/share/nvim ]]; then
|
if [[ -d ~/.local/share/nvim ]]; then
|
||||||
echo "backing up old nvim directory"
|
echo "backing up old nvim directory"
|
||||||
mv ~/.local/share/nvim ~/.local/share/nvim-$(date +'%s')
|
mv ~/.local/share/nvim ~/.local/share/nvim-"$(date +'%s')"
|
||||||
mkdir ~/.local/share/nvim
|
mkdir ~/.local/share/nvim
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim
|
git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim
|
||||||
|
|
||||||
echo "add brute force method of ignoring version complaints"
|
echo "add brute force method of ignoring version complaints"
|
||||||
git -C "$HOME/.config/nvim" am "$HOME/.config/astronvim/patches/0001-remove-version-check.patch"
|
git -C "$HOME/.config/nvim" am "$HOME/.config/astronvim/patches/0001-remove-version-check.patch"
|
||||||
|
|
||||||
nvim --headless -c 'autocmd User PackerComplete quitall'
|
nvim --headless -c 'autocmd User PackerComplete quitall'
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Checking for optional dependencies"
|
echo "Checking for optional dependencies"
|
||||||
|
|
||||||
check-dep(){
|
check-dep() {
|
||||||
if is-cmd "$1"; then
|
if is-cmd "$1"; then
|
||||||
printf '%15s \033[32m%s\033[0m\n' "$1" 'yes'
|
printf '%15s \033[32m%s\033[0m\n' "$1" 'yes'
|
||||||
else
|
else
|
||||||
printf '%15s \033[31m%s\033[0m\n' "$1" 'no'
|
printf '%15s \033[31m%s\033[0m\n' "$1" 'no'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install-astronvim
|
install-astronvim
|
||||||
|
@ -60,5 +60,5 @@ echo
|
||||||
echo "checking for dependencies"
|
echo "checking for dependencies"
|
||||||
|
|
||||||
for dep in "${deps[@]}"; do
|
for dep in "${deps[@]}"; do
|
||||||
check-dep "$dep"
|
check-dep "$dep"
|
||||||
done
|
done
|
||||||
|
|
|
@ -13,9 +13,36 @@ return {
|
||||||
["<leader>bj"] = { "<cmd>BufferLinePick<cr>", desc = "Pick to jump" },
|
["<leader>bj"] = { "<cmd>BufferLinePick<cr>", desc = "Pick to jump" },
|
||||||
["<leader>bt"] = { "<cmd>BufferLineSortByTabs<cr>", desc = "Sort by tabs" },
|
["<leader>bt"] = { "<cmd>BufferLineSortByTabs<cr>", desc = "Sort by tabs" },
|
||||||
["<leader>bp"] = { "<cmd>:bp<cr>", desc = "Previous Buffer" },
|
["<leader>bp"] = { "<cmd>:bp<cr>", desc = "Previous Buffer" },
|
||||||
|
-- disable default bindings
|
||||||
|
["<C-Down>"] = false,
|
||||||
|
["<C-Left>"] = false,
|
||||||
|
["<C-Right>"] = false,
|
||||||
|
["<C-Up>"] = false,
|
||||||
|
["<C-q>"] = false,
|
||||||
|
["<C-s>"] = false,
|
||||||
|
["<leader>fh"] = false,
|
||||||
|
["<leader>fm"] = false,
|
||||||
|
["<leader>fn"] = false,
|
||||||
|
["<leader>fo"] = false,
|
||||||
|
["<leader>sb"] = false,
|
||||||
|
["<leader>sc"] = false,
|
||||||
|
["<leader>sh"] = false,
|
||||||
|
["<leader>sk"] = false,
|
||||||
|
["<leader>sm"] = false,
|
||||||
|
["<leader>sn"] = false,
|
||||||
|
["<leader>sr"] = false,
|
||||||
|
["q:"] = "<Nop>",
|
||||||
|
-- navigating wrapped lines
|
||||||
|
j = { "gj", desc = "Navigate down" },
|
||||||
|
k = { "gk", desc = "Navigate down" },
|
||||||
},
|
},
|
||||||
t = {
|
t = {
|
||||||
-- setting a mapping to false will disable it
|
-- setting a mapping to false will disable it
|
||||||
-- ["<esc>"] = false,
|
-- ["<esc>"] = false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- map('n', 'j', "v:count ? 'j' : 'gj'", { expr = true, noremap = true })
|
||||||
|
-- map('n', 'k', "v:count ? 'k' : 'gk'", { expr = true, noremap = true })
|
||||||
|
-- map('n', "<C-j>","}",{noremap = true})
|
||||||
|
-- map('n', "<C-k>","{",{noremap = true})
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
-- from https://code.mehalter.com/projects/68/files-- from https://code.mehalter.com/projects/68/files
|
-- from https://code.mehalter.com/projects/68/files
|
||||||
return {
|
return {
|
||||||
opt = {
|
opt = {
|
||||||
conceallevel = 2, -- enable conceal
|
conceallevel = 2, -- enable conceal
|
||||||
|
@ -9,8 +9,9 @@ return {
|
||||||
list = true, -- show whitespace characters
|
list = true, -- show whitespace characters
|
||||||
listchars = { tab = "│→", extends = "⟩", precedes = "⟨", trail = "·", nbsp = "␣" },
|
listchars = { tab = "│→", extends = "⟩", precedes = "⟨", trail = "·", nbsp = "␣" },
|
||||||
showbreak = "↪ ",
|
showbreak = "↪ ",
|
||||||
spellfile = vim.fn.expand "~/.config/astronvim/lua/user/spell/en.utf-8.add",
|
spellfile = vim.fn.expand("~/.config/astronvim/lua/user/spell/en.utf-8.add"),
|
||||||
thesaurus = vim.fn.expand "~/.config/astronvim/lua/user/spell/mthesaur.txt",
|
timeoutlen = 300,
|
||||||
|
thesaurus = vim.fn.expand("~/.config/astronvim/lua/user/spell/mthesaur.txt"),
|
||||||
wrap = true, -- soft wrap lines
|
wrap = true, -- soft wrap lines
|
||||||
},
|
},
|
||||||
g = {
|
g = {
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
return {
|
||||||
|
ensure_installed = {
|
||||||
|
"cssls",
|
||||||
|
"gopls",
|
||||||
|
"html",
|
||||||
|
"jsonls",
|
||||||
|
"pyright",
|
||||||
|
"sumneko_lua",
|
||||||
|
"texlab",
|
||||||
|
"yamlls",
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
return {
|
||||||
|
ensure_installed = {
|
||||||
|
"shellcheck",
|
||||||
|
"stylua",
|
||||||
|
"black",
|
||||||
|
"isort",
|
||||||
|
"shfmt",
|
||||||
|
"shellcheck",
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
return { window = { border = "none" } }
|
|
@ -1,5 +1,5 @@
|
||||||
return function()
|
return function()
|
||||||
vim.cmd [[
|
vim.cmd([[
|
||||||
autocmd BufNewFile,BufRead Knitfile set syntax=lua
|
autocmd BufNewFile,BufRead Knitfile set syntax=lua
|
||||||
]]
|
]])
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue