Update generated nvim config
This commit is contained in:
@ -0,0 +1,17 @@
|
||||
MYVIM ?= nvim --clean --headless
|
||||
|
||||
INMAKE := 1
|
||||
export INMAKE
|
||||
|
||||
TESTS := $(wildcard *.vim)
|
||||
TESTS := $(TESTS:.vim=)
|
||||
|
||||
.PHONY: test $(TESTS) test-cleanup
|
||||
|
||||
test: $(TESTS) test-cleanup
|
||||
|
||||
$(TESTS):
|
||||
@$(MYVIM) -u $@.vim
|
||||
|
||||
test-cleanup: $(TESTS)
|
||||
@rm -f nvim_servernames.log
|
||||
@ -0,0 +1,60 @@
|
||||
% Package info
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesClass{test-custom-cls-speed}[2020/01/01 v1.0 Custom class]
|
||||
|
||||
% Class dependencies
|
||||
\LoadClass[12pt, a4paper]{report}
|
||||
\RequirePackage[hyperref]{xcolor}
|
||||
\RequirePackage[pdfusetitle]{hyperref}
|
||||
|
||||
% Graphics
|
||||
\RequirePackage{graphicx}
|
||||
|
||||
% Language
|
||||
\RequirePackage{polyglossia}
|
||||
\RequirePackage{csquotes}
|
||||
\setmainlanguage{english}
|
||||
|
||||
% Layout
|
||||
\RequirePackage[nomarginpar]{geometry}
|
||||
|
||||
% Mathematics
|
||||
\RequirePackage{amssymb, amsmath, amsthm}
|
||||
\RequirePackage[cmintegrals]{newtxmath}
|
||||
\newcommand{\true}{\mkern1mu\top\mkern1mu}
|
||||
\newcommand{\false}{\mkern1mu\bot\mkern1mu}
|
||||
\renewcommand{\emptyset}{\varnothing}
|
||||
\newcommand{\eps}{\varepsilon}
|
||||
\newcommand{\cd}{\cdot}
|
||||
\newcommand{\dd}{\,\mathrm{d}}
|
||||
\newcommand{\pd}{\partial}
|
||||
|
||||
% Fonts
|
||||
\RequirePackage{fontspec}
|
||||
\setmainfont{Ubuntu}
|
||||
|
||||
% Layout
|
||||
\RequirePackage[parfill]{parskip}
|
||||
\frenchspacing
|
||||
|
||||
% Tables
|
||||
\RequirePackage{array}
|
||||
\RequirePackage{booktabs}
|
||||
\RequirePackage{makecell}
|
||||
\RequirePackage{colortbl}
|
||||
\RequirePackage{setspace}
|
||||
\setlength{\abovetopsep}{0pt}
|
||||
\setlength{\belowrulesep}{0pt}
|
||||
\setlength{\arrayrulewidth}{1pt}
|
||||
\setlength{\tabcolsep}{0.5em}
|
||||
\newcolumntype{^}{>{\global\let\currentrowstyle\relax}}
|
||||
\newcolumntype{+}{>{\currentrowstyle}}
|
||||
\newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}#1\ignorespaces}
|
||||
\let\@bottomrule\bottomrule\renewcommand{\bottomrule}{\@bottomrule\rowstyle{\bfseries}}
|
||||
|
||||
% Contents
|
||||
\newlength{\halfline}\setlength{\halfline}{0.5\baselineskip}
|
||||
\newcommand{\justify}[1]{\makebox[\linewidth][s]{#1}}
|
||||
\newcommand{\addindent}{\hspace{\parindent}}
|
||||
\newcommand{\addline}{\vspace{\baselineskip}}
|
||||
\newcommand{\image}[2][]{\includegraphics[#1]{\string#2}}
|
||||
@ -0,0 +1,6 @@
|
||||
%! TeX program = lualatex
|
||||
\documentclass{test-custom-cls-speed}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\end{document}
|
||||
@ -0,0 +1,31 @@
|
||||
set nocompatible
|
||||
let &rtp = '../..,' . &rtp
|
||||
filetype plugin on
|
||||
|
||||
set nomore
|
||||
|
||||
nnoremap q :qall!<cr>
|
||||
|
||||
let g:vimtex_cache_root = '.'
|
||||
let g:vimtex_cache_persistent = 0
|
||||
|
||||
silent edit test-custom-cls-speed.tex
|
||||
|
||||
if empty($INMAKE) | finish | endif
|
||||
|
||||
" call vimtex#profile#start()
|
||||
|
||||
" " Test commands from custom classes for speed
|
||||
let s:candidates = vimtex#test#completion('\', '')
|
||||
call assert_true(len(s:candidates) > 0)
|
||||
|
||||
" call vimtex#profile#stop()
|
||||
" call vimtex#profile#filter([
|
||||
" \ 'FUNCTIONS SORTED ON SELF',
|
||||
" \ 'FUNCTIONS SORTED ON TOTAL',
|
||||
" \ 'FUNCTION vimtex#fold#level',
|
||||
" \])
|
||||
" call vimtex#profile#print()
|
||||
" call vimtex#profile#open()
|
||||
|
||||
call vimtex#test#finished()
|
||||
@ -0,0 +1,6 @@
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesClass{test-custom-cls}[2020/01/01 v1.0 Custom class]
|
||||
\RequirePackage{amssymb, amsmath, amsthm}
|
||||
\LoadClass[a4paper,11pt]{article}
|
||||
|
||||
\newcommand{\customtest}{Hello moon}
|
||||
@ -0,0 +1,4 @@
|
||||
\documentclass{test-custom-cls}
|
||||
\begin{document}
|
||||
|
||||
\end{document}
|
||||
@ -0,0 +1,21 @@
|
||||
set nocompatible
|
||||
let &rtp = '../..,' . &rtp
|
||||
filetype plugin on
|
||||
|
||||
set nomore
|
||||
|
||||
nnoremap q :qall!<cr>
|
||||
|
||||
let g:vimtex_cache_root = '.'
|
||||
let g:vimtex_cache_persistent = 0
|
||||
|
||||
silent edit test-custom-cls.tex
|
||||
|
||||
if empty($INMAKE) | finish | endif
|
||||
|
||||
" Test commands from custom classes
|
||||
let s:candidates = vimtex#test#completion('\', 'custom')
|
||||
call assert_true(len(s:candidates) > 0)
|
||||
call assert_equal(s:candidates[0].word, 'customtest')
|
||||
|
||||
call vimtex#test#finished()
|
||||
@ -0,0 +1,36 @@
|
||||
\documentclass{article}
|
||||
\usepackage{glossaries}
|
||||
\usepackage{mathtools}
|
||||
\usepackage{xparse}
|
||||
|
||||
% Custom glossary commands 1
|
||||
\glsaddkey
|
||||
{maccusative} % key
|
||||
{} % default value
|
||||
{\glsentrymaccusative} % no link cs
|
||||
{\Glsentrymaccusative} % no link ucfirst cs
|
||||
{\glsmacc} % link cs
|
||||
{\Glsmacc} % link ucfirst cs
|
||||
{\GLSmacc} % link all caps cs
|
||||
|
||||
\DeclareDocumentCommand{\testddc}{ o m }{%
|
||||
first #1 second #2
|
||||
}
|
||||
|
||||
% Custom glossary commands 2
|
||||
\glsaddkey{plural}{}
|
||||
{\glsentryplural}
|
||||
{\Glsentryplural}
|
||||
{\glspl}
|
||||
{\Glspl}
|
||||
{\GLSpl}
|
||||
|
||||
\let\testlet=\leftrightarrow
|
||||
|
||||
\newcommand{\testnewcommand}{Hello world}
|
||||
|
||||
\DeclarePairedDelimiter\testpaireddelim{\lvert}{\rvert}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\end{document}
|
||||
@ -0,0 +1,34 @@
|
||||
set nocompatible
|
||||
let &rtp = '../..,' . &rtp
|
||||
filetype plugin on
|
||||
|
||||
set nomore
|
||||
|
||||
nnoremap q :qall!<cr>
|
||||
|
||||
let g:vimtex_cache_root = '.'
|
||||
let g:vimtex_cache_persistent = 0
|
||||
|
||||
silent edit test-custom-cmds.tex
|
||||
|
||||
if empty($INMAKE) | finish | endif
|
||||
|
||||
" Test custom commands
|
||||
let s:candidates = vimtex#test#completion('\', 'test')
|
||||
call assert_equal(4, len(s:candidates))
|
||||
call assert_equal('testddc', s:candidates[0].word)
|
||||
call assert_equal('testnewcommand', s:candidates[1].word)
|
||||
call assert_equal('testpaireddelim', s:candidates[2].word)
|
||||
call assert_equal('testlet', s:candidates[3].word)
|
||||
|
||||
" Test commands from packages (xparse in this case)
|
||||
let s:candidates = vimtex#test#completion('\', 'DeclareD')
|
||||
call assert_true(len(s:candidates) > 0)
|
||||
call assert_equal(s:candidates[0].word, 'DeclareDocumentCommand')
|
||||
|
||||
" Test commands from custom glossaries
|
||||
let s:candidates = vimtex#test#completion('\', 'glsentry.*acc')
|
||||
call assert_true(len(s:candidates) > 0)
|
||||
call assert_equal(s:candidates[0].word, 'glsentrymaccusative')
|
||||
|
||||
call vimtex#test#finished()
|
||||
Reference in New Issue
Block a user