summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian T. <julian@jtle.dk>2023-11-19 12:48:12 +0100
committerJulian T. <julian@jtle.dk>2023-11-19 12:48:12 +0100
commit517fec1d313ca9a9cc1c7e70484a730d84cfe070 (patch)
tree5a1202a6c9d3f44ebe85acc18afea5fa42e0f811
parentf704caf68f69dfdc098746f66ab07222cf69b241 (diff)
Vim stuff
-rw-r--r--vim-core/.config/nvim/init.vim6
-rw-r--r--vim-extra/.config/nvim/extra.vim61
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 <expr> j (v:count > 1 ? "m'" . v:count : '' ) . 'j'
nnoremap <expr> k (v:count > 1 ? "m'" . v:count : '' ) . 'k'
- " Leader stuff
- let mapleader=" "
- nnoremap <SPACE> <Nop>
+ nnoremap <leader>p :echo "Leader virker"<CR>
" 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
-
-" }}}