" This file is a per-project '.exrc' file. " To easily use this file to extend the global .vimrc place it in the root of " your project and then run: " ':source .exrc' from the root of your project. " Add lispwords which occur in the Guix source tree. " NB: Vim hardcodes 2 as the indentation. See get_lisp_indent in src/indent.c setlocal lispwords+=add-after setlocal lispwords+=add-before setlocal lispwords+=case setlocal lispwords+=call-with-input-file setlocal lispwords+=define setlocal lispwords+=define* setlocal lispwords+=define*-public setlocal lispwords+=define-configuration setlocal lispwords+=define-deprecated setlocal lispwords+=define-deprecated/public setlocal lispwords+=define-deprecated/public-alias setlocal lispwords+=define-gexp-compiler setlocal lispwords+=define-module setlocal lispwords+=define-public setlocal lispwords+=define-record-type setlocal lispwords+=define-record-type* setlocal lispwords+=define-syntax setlocal lispwords+=define-values setlocal lispwords+=lambda setlocal lispwords+=lambda* setlocal lispwords+=let setlocal lispwords+=let* setlocal lispwords+=let*-values setlocal lispwords+=let-syntax setlocal lispwords+=let-values setlocal lispwords+=letrec setlocal lispwords+=letrec* setlocal lispwords+=letrec-syntax setlocal lispwords+=match-lambda setlocal lispwords+=match-lambda* setlocal lispwords+=match-record setlocal lispwords+=mixed-text-file setlocal lispwords+=modify-inputs setlocal lispwords+=modify-phases setlocal lispwords+=modify-services setlocal lispwords+=parameterize setlocal lispwords+=plain-file setlocal lispwords+=program-file setlocal lispwords+=replace setlocal lispwords+=set! setlocal lispwords+=strip-keyword-arguments setlocal lispwords+=substitute* setlocal lispwords+=substitute-keyword-arguments setlocal lispwords+=syntax-rules setlocal lispwords+=unless setlocal lispwords+=when setlocal lispwords+=while setlocal lispwords+=with-directory-excursion setlocal lispwords+=with-extensions setlocal lispwords+=with-fluids setlocal lispwords+=with-imported-modules setlocal lispwords+=with-input-to-file setlocal lispwords+=with-output-to-file setlocal lispwords+=with-parameters setlocal lispwords+=wrap-program setlocal lispwords+=wrap-script " In this repository .go files are compiled guile objects, not golang. set wildignore+=*.go " This is for the tie-in with guix.vim. " TODO: guix.vim needs to correctly export autoloaded_guix. if match(&runtimepath, 'guix') != -1 let g:guix_binary = expand('%:p:h') . "/pre-inst-env guix " endif " Editorconfig.vim has been distributed with vim since 9.0.1799. if (has('syntax') && has('eval') && \ has("patch-9.0.1799") && \ filereadable('.editorconfig') && \ (match(&runtimepath, 'editorconfig') != -1)) packadd! editorconfig endif if (has("cscope") && executable('global') && executable('find')) " These two lines could go in a gtags.conf file. call setenv('GTAGSLABEL', 'pygments') silent! call system("find {gnu,guix} -name '*\.scm' -print > gtags.files") if !filereadable("GTAGS") " This is a blocking operation, but it needs to complete before " 'cscope add' is run. In addition, there needs to be a 'trigger' of " some sort to cause vim to recognize the cscope database is ready if " vim is already open. " First run can be very slow. call system("gtags") "let tags_job = job_start("gtags", {'exit_cb': execute('cscope add GTAGS $PWD -a')}) else call system('global --update') "let tags_job = job_start('global --update', {'exit_cb': execute('cscope add GTAGS $PWD -a')}) endif execute('cscope add GTAGS $PWD -a') endif " This should make sure gtags isn't still running. if and(has("cscope"), executable('global')) autocmd BufWritePost *.scm { call system('global --update') execute('cscope add GTAGS $PWD -a') } endif