Skip to content

Commit d6773a0

Browse files
committed
fix: Fix ctags for Elixir + Svelte
1 parent 25770da commit d6773a0

File tree

7 files changed

+272
-126
lines changed

7 files changed

+272
-126
lines changed

.config/nvim/init.vim

+10-7
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Plug 'https://github.com/mhinz/vim-mix-format' " Auto-format Elixir code wi
7171
" Plug 'https://github.com/plasticboy/vim-markdown', { 'for': ['md', 'markdown']} " Markdown highlighting
7272
" let g:vim_markdown_folding_disabled = 1
7373

74-
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app & yarn install' }
74+
" Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app & yarn install' }
7575
Plug 'https://github.com/chrisbra/Colorizer'
7676
" :ColorToggle
7777

@@ -143,10 +143,6 @@ Plug 'danilamihailov/beacon.nvim'
143143
Plug 'https://github.com/itchyny/vim-cursorword'
144144
Plug 'https://github.com/dhruvasagar/vim-zoom'
145145
" <C-W>m to toggle zoom in and out for the split
146-
Plug 'https://github.com/vim-pandoc/vim-pandoc-syntax'
147-
augroup pandoc_syntax
148-
au! BufNewFile,BufFilePre,BufRead *.md set filetype=markdown.pandoc
149-
augroup END
150146

151147
fun! Startscreen()
152148
" Don't run if:
@@ -516,7 +512,7 @@ nnoremap <silent> <leader>t :Tags<CR>
516512
" Plug 'https://github.com/terryma/vim-multiple-cursors.git' " Pretty effective multiple cursors functionality
517513
Plug 'https://github.com/mg979/vim-visual-multi', {'branch': 'master'} " Alternative to https://github.com/terryma/vim-multiple-cursors.git
518514
" Plug 'https://github.com/ludovicchabant/vim-gutentags.git' " The best ctags plugin for Vim
519-
Plug 'ludovicchabant/vim-gutentags', { 'commit': '31c0ead' }
515+
Plug 'https://github.com/ludovicchabant/vim-gutentags', { 'branch': 'master' }
520516

521517
" Add plugins to &runtimepath
522518
call plug#end()
@@ -536,8 +532,8 @@ set noautochdir
536532
set number
537533
set relativenumber " show relative line numbers
538534
set numberwidth=3 " narrow number column
535+
setlocal spell " Elixir's syntax highlighting is clever enough to only spellcheck comments, so it's nice to enable this. use Ctrl+L to toggle the line number counting method
539536

540-
" use Ctrl+L to toggle the line number counting method
541537
function! g:ToggleNuMode()
542538
if &relativenumber == 1
543539
set number
@@ -727,6 +723,11 @@ cnoremap <expr> <Down> pumvisible() ? '<C-n>' : '<down>'
727723
let g:gutentags_file_list_command = 'rg --files'
728724
let g:gutentags_ctags_extra_args = ['--excmd=number']
729725
let g:gutentags_project_root = ['tags']
726+
let g:gutentags_project_info = []
727+
call add(g:gutentags_project_info, {'type': 'elixir', 'file': 'mix.exs'})
728+
call add(g:gutentags_project_info, { "type": "javascript", "glob": "assets/src/*" })
729+
call add(g:gutentags_project_info, { "type": "svelte", "glob": "*.svelte" })
730+
730731
" config project root markers.
731732
" let g:gutentags_project_root = ['.root']
732733
" generate datebases in my cache directory, prevent gtags files polluting my project
@@ -1125,6 +1126,8 @@ let g:airline#extensions#hunks#enabled=0
11251126
map <Leader>d y'>p
11261127
vmap <Leader>d y'>p
11271128
1129+
" Typing pp will insert a pipe operator
1130+
iabbrev <buffer> pp \|>
11281131

11291132
set winblend=0
11301133
set pumblend=0

.ctags

-117
This file was deleted.

0 commit comments

Comments
 (0)