Neovim config update; Allow users to skip Nvim compilation

This commit is contained in:
2024-06-24 22:37:40 +01:00
parent bfd5be22cb
commit 6eb1612244
3 changed files with 55 additions and 29 deletions

View File

@@ -644,6 +644,42 @@ require('lazy').setup({
-- init.lua. If you want these files, they are in the repository, so you can just download them and
-- place them in the correct locations.
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
-- Optional dependency
dependencies = { 'hrsh7th/nvim-cmp' },
config = function()
require('nvim-autopairs').setup {}
-- If you want to automatically add `(` after selecting a function or method
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
local cmp = require 'cmp'
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
end,
},
{
'nvim-neo-tree/neo-tree.nvim',
version = '*',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim',
},
cmd = 'Neotree',
keys = {
{ '\\', ':Neotree reveal<CR>', { desc = 'NeoTree reveal' } },
},
opts = {
filesystem = {
window = {
mappings = {
['\\'] = 'close_window',
},
},
},
},
},
-- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart
--
-- Here are some example plugins that I've included in the Kickstart repository.
@@ -652,8 +688,6 @@ require('lazy').setup({
-- require 'kickstart.plugins.debug',
-- require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`

View File

@@ -1,16 +0,0 @@
-- autopairs
-- https://github.com/windwp/nvim-autopairs
return {
'windwp/nvim-autopairs',
event = 'InsertEnter',
-- Optional dependency
dependencies = { 'hrsh7th/nvim-cmp' },
config = function()
require('nvim-autopairs').setup {}
-- If you want to automatically add `(` after selecting a function or method
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
local cmp = require 'cmp'
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
end,
}

View File

@@ -16,9 +16,9 @@ dialog --erase-on-exit \
"3" "Install GitHub CLI" "off"\
"4" "Install AI Tools" "off"\
"5" "Install MultiMC" "off"\
"6" "Enable bluetooth support" "off" 2> main.tmp
main_menu=$( cat main.tmp )
rm main.tmp
"6" "Enable bluetooth support" "off" 2> choice.tmp
main_menu=$( cat choice.tmp )
rm choice.tmp
mkdir logs
rm logs/compile.log
@@ -179,6 +179,13 @@ for selection in $main_menu; do
dialogDotfiles 75 5 5 5 5 5 7 4 4 4
# Neovim
dialog --erase-on-exit \
--backtitle "$BACKTITLE" \
--title "Install/Update Neovim?" \
--yesno "Nvim will be compiled from source. This may take a long time, depending on your device. If unsure, select yes." 10 40
if [ "$?" -eq 0 ]; then
# NVIM has to be compiled from source to support arm64 and i386 devices, for example.
sudo apt-get install -y ninja-build gettext cmake unzip curl build-essential
git clone https://github.com/neovim/neovim --depth 1 2>/dev/null
cd neovim
@@ -187,6 +194,7 @@ for selection in $main_menu; do
sudo make install
cd ..
rm -rf neovim
fi
dialogDotfiles 80 5 5 5 5 5 5 7 4 4
# Utilities