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 -- 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. -- 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 -- 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. -- 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.debug',
-- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- 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` -- 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"\ "3" "Install GitHub CLI" "off"\
"4" "Install AI Tools" "off"\ "4" "Install AI Tools" "off"\
"5" "Install MultiMC" "off"\ "5" "Install MultiMC" "off"\
"6" "Enable bluetooth support" "off" 2> main.tmp "6" "Enable bluetooth support" "off" 2> choice.tmp
main_menu=$( cat main.tmp ) main_menu=$( cat choice.tmp )
rm main.tmp rm choice.tmp
mkdir logs mkdir logs
rm logs/compile.log rm logs/compile.log
@@ -179,14 +179,22 @@ for selection in $main_menu; do
dialogDotfiles 75 5 5 5 5 5 7 4 4 4 dialogDotfiles 75 5 5 5 5 5 7 4 4 4
# Neovim # Neovim
sudo apt-get install -y ninja-build gettext cmake unzip curl build-essential dialog --erase-on-exit \
git clone https://github.com/neovim/neovim --depth 1 2>/dev/null --backtitle "$BACKTITLE" \
cd neovim --title "Install/Update Neovim?" \
git checkout stable --yesno "Nvim will be compiled from source. This may take a long time, depending on your device. If unsure, select yes." 10 40
make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install if [ "$?" -eq 0 ]; then
cd .. # NVIM has to be compiled from source to support arm64 and i386 devices, for example.
rm -rf neovim 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
git checkout stable
make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install
cd ..
rm -rf neovim
fi
dialogDotfiles 80 5 5 5 5 5 5 7 4 4 dialogDotfiles 80 5 5 5 5 5 5 7 4 4
# Utilities # Utilities