My vim configuration
git clone https://github.com/m-col/vim-misc
Files | Refs | Readme

Commit c402c8596f8bd4fd64132a1f51baf96307dad88d
Parent: 9240356896da86708d9d362fd044c82b38a3343e
Author: mcol <mcol@posteo.net>
Date: 2025-05-08 18:07:52 +0100
Committer: Matt Colligan <mlv@posteo.net>
Committed: 2025-05-13 17:03:29 +0100

add some typescript stuff

start/self/plugin/settings.vim Modified

@@ -80,6 +80,7 @@
 let g:ale_linters = {
 \   'haskell': ['hlint'],
 \   'python': ['flake8', 'pyright', 'ruff'],
+\   'typescriptreact': ['tsserver', 'eslint'],
 \}
 " Don't show errors in virtual text or signs column; rely on echoed message instead
 let g:ale_virtualtext_cursor = 0
@@ -88,6 +89,7 @@
 let g:ale_fixers = {
 \   'haskell': ['ormolu'],
 \   'python': ['black', 'ruff'],
+\   'typescriptreact': ['eslint'],
 \}
 "\   'markdown': ['prettier'],
 

start/self/plugin/keybindings.vim Modified

@@ -130,20 +130,10 @@
 " ALE find references
 nmap <silent> <C-i> <Plug>(ale_find_references)
 
+nmap <silent> <C-]> <Plug>(ale_go_to_definition)
+
 " CtrlP (in addition to the default Ctrl-p binding)
 nnoremap <silent> <C-o> :CtrlPTag<CR>
 
-
 " blamer
 nnoremap <A-b> :BlamerToggle<CR>
-
-" add python breakpoint: vim function that checks for 'breakpoint' in the current line and removes this line if it exists, otherwise adds a new line on this line with breakpoint() on it
-function! Breakpoint()
-    let l:line = getline('.')
-    if match(l:line, 'breakpoint') != -1
-	execute 'normal! dd'
-    else
-	execute 'normal! Obreakpoint()'
-    endif
-endfunction
-nnoremap <C-b> :call Breakpoint()<CR>

start/self/ftplugin/typescriptreact.vim Added

@@ -0,0 +1,4 @@
+setlocal tabstop=2
+setlocal softtabstop=2
+setlocal shiftwidth=2
+setlocal expandtab

start/self/ftplugin/typescript.vim Added

@@ -0,0 +1,4 @@
+setlocal tabstop=2
+setlocal softtabstop=2
+setlocal shiftwidth=2
+setlocal expandtab

start/self/ftplugin/python.vim Modified

@@ -3,3 +3,14 @@
 setlocal shiftwidth=4
 setlocal textwidth=88
 setlocal expandtab
+
+" add python breakpoint: vim function that checks for 'breakpoint' in the current line and removes this line if it exists, otherwise adds a new line on this line with breakpoint() on it
+function! Breakpoint()
+    let l:line = getline('.')
+    if match(l:line, 'breakpoint') != -1
+	execute 'normal! dd'
+    else
+	execute 'normal! Obreakpoint()'
+    endif
+endfunction
+nnoremap <C-b> :call Breakpoint()<CR>