From 517fec1d313ca9a9cc1c7e70484a730d84cfe070 Mon Sep 17 00:00:00 2001 From: "Julian T." Date: Sun, 19 Nov 2023 12:48:12 +0100 Subject: Vim stuff --- vim-core/.config/nvim/init.vim | 6 ++-- vim-extra/.config/nvim/extra.vim | 61 +++++++++++++--------------------------- 2 files changed, 22 insertions(+), 45 deletions(-) diff --git a/vim-core/.config/nvim/init.vim b/vim-core/.config/nvim/init.vim index 5a57355..fc5f2e5 100644 --- a/vim-core/.config/nvim/init.vim +++ b/vim-core/.config/nvim/init.vim @@ -2,6 +2,8 @@ set nocompatible filetype plugin on set shellslash +let mapleader="," + runtime extra.vim filetype plugin indent on " required @@ -97,9 +99,7 @@ filetype plugin indent on " required nnoremap j (v:count > 1 ? "m'" . v:count : '' ) . 'j' nnoremap k (v:count > 1 ? "m'" . v:count : '' ) . 'k' - " Leader stuff - let mapleader=" " - nnoremap + nnoremap p :echo "Leader virker" " Enforcing filetypes{{{ autocmd BufRead,BufNewFile *.ino set filetype=c diff --git a/vim-extra/.config/nvim/extra.vim b/vim-extra/.config/nvim/extra.vim index 415444f..440d86b 100644 --- a/vim-extra/.config/nvim/extra.vim +++ b/vim-extra/.config/nvim/extra.vim @@ -1,70 +1,47 @@ " Plugins{{{ call plug#begin() Plug 'neovim/nvim-lspconfig' - Plug 'Shougo/echodoc.vim' - - Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'tpope/vim-surround' Plug 'tpope/vim-repeat' Plug 'NLKNguyen/papercolor-theme' - Plug 'LnL7/vim-nix' - Plug 'fatih/vim-go' Plug 'lervag/vimtex' + Plug 'nvim-treesitter/nvim-treesitter' + call plug#end() " }}} +" Treesitter {{{ +lua << EOF + require'nvim-treesitter.configs'.setup { + ensure_installed = { "lua", "typescript", "java", "tsx" }, + auto_install = false, + highlight = { + enable = true, + }, + indent = { + enable = true, + } + } +EOF +" }}} + " Completion{{{ set completeopt+=menuone set completeopt+=noselect - - if has('nvim') - let g:echodoc#enable_at_startup = 1 - let g:echodoc#type = 'virtual' - endif - + " " Close completion window autocmd CompleteDone * pclose colorscheme PaperColor - lua << EOF - local lspconfig = require("lspconfig") - lspconfig.clangd.setup {} - - vim.api.nvim_create_autocmd("LspAttach", { - group = vim.api.nvim_create_augroup("UserLspConfig", {}), - callback = function (ev) - vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc" - end, - }) -EOF "}}} " Latex {{{ - let g:vimtex_view_method = 'zathura' + let g:vimtex_view_method = 'general' let g:vimtex_quickfix_open_on_warning = 0 "}}} - -" Tree sitter {{{ - -lua << EOF -require'nvim-treesitter.configs'.setup { - ensure_installed = { "c", "lua", "vim", "rust", "help" }, - - highlight = { - enable = true, - - disable = { "latex" }, - }, - incremental_selection = { - enable = true, - }, -} -EOF - -" }}} -- cgit v1.2.3