From 62ab18b2f8136908fb035e6e299ae63ade605b87 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sat, 19 Oct 2024 23:16:26 +0200 Subject: Use Lua --- .config/nvim/init.vim | 229 -------------------------------------------------- 1 file changed, 229 deletions(-) delete mode 100644 .config/nvim/init.vim (limited to '.config/nvim/init.vim') diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim deleted file mode 100644 index cb97175..0000000 --- a/.config/nvim/init.vim +++ /dev/null @@ -1,229 +0,0 @@ -autocmd! bufwritepost .vimrc source % - -if has('nvim') - call plug#begin('~/.vim/plugged') - - Plug 'cespare/vim-toml', { 'branch': 'main' } - Plug 'rust-lang/rust.vim' - Plug 'nvim-lua/plenary.nvim' - Plug 'lewis6991/gitsigns.nvim' - Plug 'kyazdani42/nvim-web-devicons' - Plug 'mg979/vim-visual-multi', {'branch': 'master'} - Plug 'tpope/vim-fugitive' " git extension for commit logs and etc. - Plug 'ap/vim-css-color' - Plug 'Yggdroot/indentLine' - - Plug 'google/vim-searchindex' - - Plug 'numToStr/Comment.nvim' - - Plug 'matze/vim-move' - - Plug 'togglebyte/togglerust' " Debug Rust projects - - Plug 'chriskempson/base16-vim' - Plug 'NLKNguyen/papercolor-theme' - - " Plug 'editorconfig/editorconfig-vim' - - Plug 'nvim-telescope/telescope.nvim' - Plug 'neovim/nvim-lspconfig' - - Plug 'hrsh7th/nvim-cmp' - Plug 'hrsh7th/cmp-nvim-lsp' - Plug 'saadparwaiz1/cmp_luasnip' - Plug 'L3MON4D3/LuaSnip' - - Plug 'kyazdani42/nvim-tree.lua' - Plug 'ray-x/lsp_signature.nvim' - Plug 'folke/todo-comments.nvim' - Plug 'saecki/crates.nvim' - Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} - - Plug 'folke/trouble.nvim' - Plug 'folke/lsp-colors.nvim' - - Plug 'sindrets/diffview.nvim' - - - " indentline - let g:indentLine_char = '¦' - let g:vim_json_syntax_conceal = 0 - - let g:netrw_liststyle=1 - - " vim-move - let g:move_key_modifier = 'C' - - call plug#end() " required - - syntax on -endif - - -set runtimepath+=~/.vim-plugins/LanguageClient-neovim - -set completeopt=menu,menuone,noselect - -set clipboard=unnamed - -" copy with `y` to clipboard -ca ce set clipboard+=unnamedplus -ca cd set clipboard-=unnamedplus - -set mouse=a " click with mouse -set wildmenu -set wildmode=full -set wildignore=*~,*.png,*.jpg,*.gif,Thumbs.db,*.min.js,*.swp,*.o,vendor,*.pyc - -set number " number of the current line -set relativenumber " relative number, ..-2 -1 x 1 2, where x is current line -set textwidth=80 -set colorcolumn=80 -set nowrap -set fo-=t - -set tabstop=4 -set shiftwidth=4 -set expandtab " convert tabs in spaces - -set ai " auto indent -set autoread - -set encoding=UTF-8 -set history=1000 - -set hlsearch " highlight search -set incsearch - -set nowritebackup -set laststatus=2 - -set list " spaces as characters -set listchars=eol:⏎,tab:»·,trail:ˑ,nbsp:⎵ - -set foldmethod=indent - -set splitright " split on right side -set splitbelow -set lazyredraw -set ttyfast - -set noswapfile - -set termguicolors -set background=dark - -if has('nvim') - let base16colorspace=256 - " colorscheme base16-irblack - " colorscheme base16-gruvbox-dark-hard - colorscheme PaperColor - - highlight Normal guibg=NONE - highlight NonText guibg=NONE - highlight LineNr guibg=NONE - highlight CursorLine guibg=NONE - highlight CursorLineNr guibg=NONE guifg=YELLOW - highlight StatusLine guibg=NONE guifg=YELLOW - highlight StatusLineNC guibg=NONE guifg=#dddddd - highlight SignColumn guibg=NONE - highlight GitGutterChange guibg=NONE - highlight GitGutterAdd guibg=NONE - highlight GitGutterDelete guibg=NONE - - lua require('git') - let g:coq_settings = { 'auto_start': v:true } - lua require('lsp_conf') - - lua require('nvim-tree').setup({ actions = { open_file = { quit_on_open = true } } }) - lua require('todo-comments').setup() - lua require('crates').setup() - - lua require('nvim-treesitter.configs').setup({ highlight = { enable = true, }, }) - - lua require('lsp-colors').setup() - - lua require('Comment').setup() - - lua require('diffview').setup() - ca do DiffviewOpen - ca dc DiffviewClose - ca dh DiffviewFileHistory - - " Launch gopls when Go files are in use - let g:LanguageClient_serverCommands = { 'go': ['gopls'] } - " Run gofmt on save - - set cursorline " need for Neovim 0.6 for highlight CursorLineNr -else - colorscheme gruvbox -endif - -" Figure out the system Python for Neovim. -if exists("$VIRTUAL_ENV") - let g:python3_host_prog=substitute(system("which -a python3 | head -n2 | tail -n1"), "\n", '', 'g') -else - let g:python3_host_prog=substitute(system("which python3"), "\n", '', 'g') -endif - -filetype plugin indent on -set nocompatible - -set showcmd " show commands at bottom - -" nvim-tree -nnoremap :NvimTreeToggle - -" ------------ -" MAPS -" ----------- -if has('nvim') - let mapleader = "," -endif - -nnoremap j gj -nnoremap k gk - -nnoremap tn :tabnew - -nnoremap xx :TroubleToggle -nnoremap xf :TodoQuickFix - -" buffers -nnoremap ]b :bnext -nnoremap [b :bprev -nnoremap b Telescope buffers - -" tabs -nnoremap ]t :tabn -nnoremap [t :tabp - -" only one window -nnoremap o :only - - -nnoremap ff Telescope find_files -nnoremap fg Telescope live_grep -nnoremap fh Telescope help_tags - -nnoremap pa :set paste -nnoremap npa :set nopaste - - -nmap cr :Cargo run - -if &diff - "Get from remote - nnoremap dr :diffgetRE - "Get from base - nnoremap db :diffgetBA - "Get from local - nnoremap dl :diffgetLO -endif - -if has('nvim') - packadd termdebug - let g:termdebug_wide = 1 - let g:TermDebugging = 0 -endif -- cgit v1.2.3-18-g5258