diff --git a/.bash_extra b/.bash_extra index 5ea5608..743accc 100644 --- a/.bash_extra +++ b/.bash_extra @@ -10,7 +10,7 @@ source "${HOME}/dotfiles/.bash_ps1" ### PATH # add my scripts to PATH -PATH=$PATH:"${HOME}/dotfiles/scripts" +PATH=$PATH:"${HOME}/dotfiles/scripts:${HOME}/.bin/nvim-linux64/bin/" ### tmux auto attach # Check if the user ID is not 0 (root) diff --git a/nvim/init.lua b/nvim/init.lua new file mode 100644 index 0000000..fb54274 --- /dev/null +++ b/nvim/init.lua @@ -0,0 +1,40 @@ +-- Set as the leader key +-- See `:help mapleader` +-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) +vim.g.mapleader = ' ' +vim.g.maplocalleader = ' ' +-- Set to true if you have a Nerd Font installed and selected in the terminal +vim.g.have_nerd_font = false +-- Make line numbers default +vim.opt.number = true +-- Enable mouse mode, can be useful for resizing splits for example! +vim.opt.mouse = 'a' +-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term +vim.opt.ignorecase = true +vim.opt.smartcase = true +-- Preview substitutions live, as you type! +vim.opt.inccommand = 'split' +-- Minimal number of screen lines to keep above and below the cursor. +vim.opt.scrolloff = 10 +-- Plugin-Manager +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) +require("lazy").setup({ + { + 'nvim-telescope/telescope.nvim', + lazy = true, + dependencies = { + {'nvim-lua/plenary.nvim'}, + } + }, +}) diff --git a/scripts/setup_minimal.sh b/scripts/setup_minimal.sh index c9aea2d..5b65116 100755 --- a/scripts/setup_minimal.sh +++ b/scripts/setup_minimal.sh @@ -1,17 +1,20 @@ #!/bin/bash -# Aufruf: wget https://git.mgrote.net/mg/dotfiles/raw/branch/master/scripts/setup_minimal.sh && bash ./setup_minimal.sh +# Aufruf: wget https://git.mgrote.net/mg/dotfiles/raw/branch/master/scripts/setup_minimal.sh && bash ./setup_minimal.sh cd ~ +sudo apt update && sudo apt install git tmux ripgrep ca-certificates +#neovim +mkdir -p ~/.bin +curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz +sudo tar -C ~/.bin -xzf nvim-linux64.tar.gz +rm nvim-linux64.tar.gz -sudo apt update && sudo apt install git tmux vim ripgrep ca-certificates -git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim git clone https://git.mgrote.net/mg/dotfiles ~/dotfiles ln -s ~/dotfiles/.tmux.conf ~/.tmux.conf -ln -s ~/dotfiles/.vimrc ~/.vimrc + +ln -s dotfiles/nvim/init.lua .config/nvim/init.lua echo "source ~/dotfiles/.bash_extra" >> ~/.bashrc -vim +PluginInstall +qall - source ~/.bashrc