From 0cd329e8b9bb1a5c48386f30c7a77405789b6d04 Mon Sep 17 00:00:00 2001 From: nnduc Date: Tue, 17 Feb 2026 01:50:51 +0700 Subject: [PATCH] lua nvim --- nvim/.vimrc | 143 -------------------------- nvim/coc-settings.json | 2 - nvim/init.lua | 214 ++++++++++++++++++++++++++++++++++++++ nvim/init.vim | 132 ------------------------ nvim/init.vim(server) | 127 ----------------------- nvim/latexmk.vim | 227 ----------------------------------------- nvim/site/vi.utf-8.spl | Bin 20334 -> 0 bytes 7 files changed, 214 insertions(+), 631 deletions(-) delete mode 100644 nvim/.vimrc delete mode 100644 nvim/coc-settings.json create mode 100644 nvim/init.lua delete mode 100644 nvim/init.vim delete mode 100644 nvim/init.vim(server) delete mode 100644 nvim/latexmk.vim delete mode 100644 nvim/site/vi.utf-8.spl diff --git a/nvim/.vimrc b/nvim/.vimrc deleted file mode 100644 index 62860f8..0000000 --- a/nvim/.vimrc +++ /dev/null @@ -1,143 +0,0 @@ -syntax on -set number -set cursorline -set expandtab tabstop=4 shiftwidth=4 softtabstop=4 -set autoindent -set spelllang=vi,en - - -" Fold -set foldmethod=syntax -set foldlevel=1 -set foldnestmax=1 -set encoding=utf8 - -" Search -set hlsearch -nnoremap i :nohlsi - -" Plugin -call plug#begin() -Plug 'neoclide/coc.nvim', {'branch': 'release'} -Plug 'dense-analysis/ale' -Plug 'preservim/nerdtree' -Plug 'preservim/nerdcommenter' -Plug 'lervag/vimtex' -Plug 'JuliaEditorSupport/julia-vim' -Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } -Plug 'junegunn/fzf.vim' -Plug 'honza/vim-snippets' -Plug 'vim-airline/vim-airline' -Plug 'vim-airline/vim-airline-themes' -Plug 'kevinhwang91/nvim-bqf' -Plug 'morhetz/gruvbox' -Plug 'tpope/vim-fugitive' -Plug 'ynkdir/vim-diff' -Plug '4ree/vim-ime' -call plug#end() - -"Color scheme -"colorscheme iceberg -"set background=light -colorscheme gruvbox -let g:gruvbox_contrast_light = 'hard' -hi clear SpellBad -hi SpellBad cterm=underline ctermfg=red - - -"Open NERDTree -:nnoremap g:NERDTree.IsOpen() ? "\:NERDTreeClose" : bufexists(expand('%')) ? "\:NERDTreeFind" : "\:NERDTree" - -"Coc.nvim -inoremap - \ coc#pum#visible() ? coc#_select_confirm() : - \ coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : - \ CheckBackSpace() ? "\" : - \ coc#refresh() -inoremap pumvisible() ? coc#_select_confirm() - \: "\u\\=coc#on_enter()\" - -function! CheckBackSpace() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -let g:coc_snippet_next = '' -inoremap coc#pum#visible() ? coc#pum#confirm() - \: "\u\\=coc#on_enter()\" - -" Comments -let mapleader = "," - -" remap save -nnoremap :w - -" moving between windows -nnoremap h -nnoremap j -nnoremap k -nnoremap l -nnoremap h -nnoremap j -nnoremap k -nnoremap l -nnoremap to :tabonly -nnoremap o :only -nnoremap :tabn -nnoremap :tabp - -"set clipboard+=unnamedplus -" " Copy to clipboard -vnoremap y "+y -nnoremap Y "+yg_ -nnoremap y "+y -nnoremap yy "+yy - -" " Paste from clipboard -nnoremap p "+p -nnoremap P "+P - - -" FZF key mapping -nnoremap b :Buffers -nnoremap r :Rg -nnoremap f :Files -nnoremap g :GFiles -nnoremap w :Rg - -filetype plugin on -set splitright -set splitbelow - -let g:vimtex_view_method= 'zathura' - -"Language tool -map :ALEToggle - - -"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux. -"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support -"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.) -if (empty($TMUX)) - if (has("nvim")) - "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 > - let $NVIM_TUI_ENABLE_TRUE_COLOR=1 - endif - "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 > - "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd > - " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 > - if (has("termguicolors")) - set termguicolors - endif -endif - -if &term =~ 'xterm' || &term == 'win32' - " Use DECSCUSR escape sequences - let &t_SI = "\e[5 q" " blink bar - let &t_SR = "\e[3 q" " blink underline - let &t_EI = "\e[1 q" " blink block - let &t_ti ..= "\e[1 q" " blink block - let &t_te ..= "\e[0 q" " default (depends on terminal, normally blink - " block) -endif - diff --git a/nvim/coc-settings.json b/nvim/coc-settings.json deleted file mode 100644 index 3ba2825..0000000 --- a/nvim/coc-settings.json +++ /dev/null @@ -1,2 +0,0 @@ -{"coc.preferences.diagnostic.displayByAle":1 -} diff --git a/nvim/init.lua b/nvim/init.lua new file mode 100644 index 0000000..c1c3463 --- /dev/null +++ b/nvim/init.lua @@ -0,0 +1,214 @@ +-- Leader key (must be set before lazy.nvim loads) +vim.g.mapleader = "," + +-------------------- Options -------------------- +vim.opt.number = true +vim.opt.cursorline = true +vim.opt.expandtab = true +vim.opt.tabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.softtabstop = 4 +vim.opt.autoindent = true +vim.opt.spelllang = "vi,en" +vim.opt.foldmethod = "syntax" +vim.opt.foldlevel = 1 +vim.opt.foldnestmax = 1 +vim.opt.hlsearch = true +vim.opt.splitright = true +vim.opt.splitbelow = true +vim.opt.termguicolors = true + +-------------------- Keymaps -------------------- +-- Clear hlsearch then enter insert mode +vim.keymap.set("n", "i", ":nohlsi", { silent = true }) + +-- Save with space +vim.keymap.set("n", "", ":w", { silent = true }) + +-- Window navigation +vim.keymap.set("n", "", "h") +vim.keymap.set("n", "", "j") +vim.keymap.set("n", "", "k") +vim.keymap.set("n", "", "l") +vim.keymap.set("n", "", "h") +vim.keymap.set("n", "", "j") +vim.keymap.set("n", "", "k") +vim.keymap.set("n", "", "l") + +-- Tab management +vim.keymap.set("n", "to", ":tabonly", { silent = true }) +vim.keymap.set("n", "o", ":only", { silent = true }) +vim.keymap.set("n", "", ":tabn", { silent = true }) +vim.keymap.set("n", "", ":tabp", { silent = true }) + +-- Clipboard operations +vim.keymap.set("v", "y", '"+y') +vim.keymap.set("n", "Y", '"+yg_') +vim.keymap.set("n", "y", '"+y') +vim.keymap.set("n", "yy", '"+yy') +vim.keymap.set("n", "p", '"+p') +vim.keymap.set("n", "P", '"+P') + +-------------------- Bootstrap lazy.nvim -------------------- +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.uv.fs_stat(lazypath) then + vim.fn.system({ + "git", "clone", "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +-------------------- Plugins -------------------- +require("lazy").setup({ + + -- Colorscheme + { + "ellisonleao/gruvbox.nvim", + priority = 1000, + config = function() + require("gruvbox").setup({ + contrast = "hard", + }) + vim.cmd.colorscheme("gruvbox") + end, + }, + + -- Icons (dependency for nvim-tree and lualine) + { "nvim-tree/nvim-web-devicons", lazy = true }, + + -- File tree + { + "nvim-tree/nvim-tree.lua", + dependencies = { "nvim-tree/nvim-web-devicons" }, + keys = { + { "", "NvimTreeToggle", desc = "Toggle file tree" }, + }, + config = function() + require("nvim-tree").setup() + end, + }, + + -- Comments + { + "numToStr/Comment.nvim", + event = "VeryLazy", + config = function() + require("Comment").setup() + end, + }, + + -- Fuzzy finder (telescope replaces fzf) + { + "nvim-telescope/telescope.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, + }, + keys = { + { "b", "Telescope buffers", desc = "Buffers" }, + { "r", "Telescope live_grep", desc = "Live grep" }, + { "f", "Telescope find_files", desc = "Find files" }, + { "g", "Telescope git_files", desc = "Git files" }, + { "w", "Telescope grep_string", desc = "Grep word under cursor" }, + }, + config = function() + require("telescope").setup() + require("telescope").load_extension("fzf") + end, + }, + + -- Statusline + { + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("lualine").setup({ + options = { theme = "gruvbox" }, + }) + end, + }, + + -- Autopairs + { + "windwp/nvim-autopairs", + event = "InsertEnter", + opts = {}, + }, + + -- Surround + { "4ree/viml-surround", event = "VeryLazy" }, + + -- LSP + { + "neovim/nvim-lspconfig", + config = function() + vim.lsp.config("clangd", {}) + vim.lsp.config("pyright", {}) + vim.lsp.config("rust_analyzer", {}) + vim.lsp.config("julials", {}) + vim.lsp.enable({ "clangd", "pyright", "rust_analyzer", "julials" }) + + vim.api.nvim_create_autocmd("LspAttach", { + callback = function(args) + local opts = { buffer = args.buf } + vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts) + vim.keymap.set("n", "gr", vim.lsp.buf.references, opts) + vim.keymap.set("n", "K", vim.lsp.buf.hover, opts) + vim.keymap.set("n", "rn", vim.lsp.buf.rename, opts) + vim.keymap.set("n", "ca", vim.lsp.buf.code_action, opts) + end, + }) + end, + }, + + -- Completion (coq_nvim) + { + "ms-jpq/coq_nvim", + branch = "coq", + dependencies = { + { "ms-jpq/coq.artifacts", branch = "artifacts" }, + { "ms-jpq/coq.thirdparty", branch = "3p" }, + }, + init = function() + vim.g.coq_settings = { auto_start = "shut-up" } + end, + }, + + -- Quickfix enhancements + { "kevinhwang91/nvim-bqf", ft = "qf" }, + + -- Git + { "tpope/vim-fugitive" }, + + -- IME support + { + "4ree/vim-ime", + event = "VeryLazy", + opts = {}, + }, + + -- LaTeX + { + "lervag/vimtex", + config = function() + vim.g.vimtex_view_method = "zathura" + vim.g.vimtex_compiler_latexmk = { + options = { + "-verbose", + "-file-line-error", + "-synctex=1", + "-interaction=nonstopmode", + "-shell-escape", + "-output-directory=./output", + "-aux-directory=./", + }, + } + end, + }, + + -- Julia + { "JuliaEditorSupport/julia-vim" }, +}) diff --git a/nvim/init.vim b/nvim/init.vim deleted file mode 100644 index d0b0480..0000000 --- a/nvim/init.vim +++ /dev/null @@ -1,132 +0,0 @@ -syntax on -set number -set cursorline -set expandtab tabstop=4 shiftwidth=4 softtabstop=4 -set autoindent -set spelllang=vi,en - - -" Fold -set foldmethod=syntax -set foldlevel=1 -set foldnestmax=1 -set encoding=utf8 - -" Search -set hlsearch -nnoremap i :nohlsi - -" Plugin -call plug#begin() -Plug 'neoclide/coc.nvim', {'branch': 'release'} -Plug 'dense-analysis/ale' -Plug 'preservim/nerdtree' -Plug 'preservim/nerdcommenter' -Plug 'lervag/vimtex' -Plug 'JuliaEditorSupport/julia-vim' -Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } -Plug 'junegunn/fzf.vim' -Plug 'honza/vim-snippets' -Plug 'vim-airline/vim-airline' -Plug 'vim-airline/vim-airline-themes' -Plug 'kevinhwang91/nvim-bqf' -Plug 'morhetz/gruvbox' -Plug 'tpope/vim-fugitive' -Plug 'ynkdir/vim-diff' -Plug '4ree/vim-ime' -call plug#end() - -"Color scheme -"colorscheme iceberg -"set background=light -colorscheme gruvbox -let g:gruvbox_contrast_light = 'hard' - - - -"Open NERDTree - map :NERDTreeToggle - - -"Coc.nvim -inoremap - \ coc#pum#visible() ? coc#_select_confirm() : - \ coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : - \ CheckBackSpace() ? "\" : - \ coc#refresh() -inoremap pumvisible() ? coc#_select_confirm() - \: "\u\\=coc#on_enter()\" - -function! CheckBackSpace() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -let g:coc_snippet_next = '' -inoremap coc#pum#visible() ? coc#pum#confirm() - \: "\u\\=coc#on_enter()\" - -" Comments -let mapleader = "," - -" remap save -nnoremap :w - -" moving between windows -nnoremap h -nnoremap j -nnoremap k -nnoremap l -nnoremap h -nnoremap j -nnoremap k -nnoremap l -nnoremap to :tabonly -nnoremap o :only -nnoremap :tabn -nnoremap :tabp - -"set clipboard+=unnamedplus -" " Copy to clipboard -vnoremap y "+y -nnoremap Y "+yg_ -nnoremap y "+y -nnoremap yy "+yy - -" " Paste from clipboard -nnoremap p "+p -nnoremap P "+P - - -" FZF key mapping -nnoremap b :Buffers -nnoremap r :Rg -nnoremap f :Files -nnoremap g :GFiles -nnoremap w :Rg - -filetype plugin on -set splitright -set splitbelow - -let g:vimtex_view_method= 'zathura' - -"Language tool -map :ALEToggle - - -"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux. -"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support -"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.) -if (empty($TMUX)) - if (has("nvim")) - "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 > - let $NVIM_TUI_ENABLE_TRUE_COLOR=1 - endif - "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 > - "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd > - " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 > - if (has("termguicolors")) - set termguicolors - endif -endif diff --git a/nvim/init.vim(server) b/nvim/init.vim(server) deleted file mode 100644 index 842dadb..0000000 --- a/nvim/init.vim(server) +++ /dev/null @@ -1,127 +0,0 @@ -syntax on -set number -set cursorline -set expandtab tabstop=4 shiftwidth=4 softtabstop=4 -set autoindent -set spelllang=vi,en - -" Fold -set foldmethod=syntax -set foldlevel=1 -set foldnestmax=1 -set encoding=utf8 - -" Search -set hlsearch -nnoremap i :nohlsi - -" Plugin -call plug#begin() -Plug 'neoclide/coc.nvim', {'branch': 'release'} -Plug 'preservim/nerdtree' -Plug 'preservim/nerdcommenter' -Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } -Plug 'junegunn/fzf.vim' -Plug 'vim-airline/vim-airline' -Plug 'vim-airline/vim-airline-themes' -Plug 'kevinhwang91/nvim-bqf' -Plug 'morhetz/gruvbox' -Plug 'tpope/vim-fugitive' -Plug 'ynkdir/vim-diff' -call plug#end() - -"Color scheme - -colorscheme gruvbox -let g:gruvbox_contrast_light = 'hard' - -set background=dark - -" Comments -let mapleader = "," - -"Open NERDTree -:nnoremap g:NERDTree.IsOpen() ? "\:NERDTreeClose" : bufexists(expand('%')) ? "\:NERDTreeFind" : "\:NERDTree" - - -"Coc.nvim -inoremap - \ coc#pum#visible() ? coc#_select_confirm() : - \ coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : - \ CheckBackSpace() ? "\" : - \ coc#refresh() - -inoremap coc#pum#visible() ? coc#_select_confirm() : coc#refresh() - -function! CheckBackSpace() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -let g:coc_snippet_next = '' -" remap save -nnoremap :w - -" moving between windows -nnoremap h -nnoremap j -nnoremap k -nnoremap l -nnoremap h -nnoremap j -nnoremap k -nnoremap l -nnoremap to :tabonly -nnoremap o :only -nnoremap :tabn -nnoremap :tabp - -"set clipboard+=unnamedplus -" " Copy to clipboard -vnoremap y "+y -nnoremap Y "+yg_ -nnoremap y "+y -nnoremap yy "+yy - -" " Paste from clipboard -nnoremap p "+p -nnoremap P "+P - - -" FZF key mapping -nnoremap b :Buffers -nnoremap r :Rg -nnoremap f :Files -nnoremap g :GFiles -nnoremap w :Rg - -filetype plugin on -set splitright -set splitbelow - -"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux. -"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support -"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.) -if (empty($TMUX)) - if (has("nvim")) - "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 > - let $NVIM_TUI_ENABLE_TRUE_COLOR=1 - endif - "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 > - "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd > - " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 > - if (has("termguicolors")) - set termguicolors - endif -endif - -if &term =~ 'xterm' || &term == 'win32' - " Use DECSCUSR escape sequences - let &t_SI = "\e[5 q" " blink bar - let &t_SR = "\e[3 q" " blink underline - let &t_EI = "\e[1 q" " blink block - let &t_ti ..= "\e[1 q" " blink block - let &t_te ..= "\e[0 q" " default (depends on terminal, normally blink - " block) -endif - diff --git a/nvim/latexmk.vim b/nvim/latexmk.vim deleted file mode 100644 index d244df6..0000000 --- a/nvim/latexmk.vim +++ /dev/null @@ -1,227 +0,0 @@ -" VimTeX - LaTeX plugin for Vim -" -" Maintainer: Karl Yngve LervÄg -" Email: karl.yngve@gmail.com -" - -function! vimtex#compiler#latexmk#init(options) abort " {{{1 - return s:compiler.new(a:options) -endfunction - -" }}}1 - -function! vimtex#compiler#latexmk#get_rc_opt(root, opt, type, default) abort " {{{1 - " - " Parse option from .latexmkrc. - " - " Arguments: - " root Root of LaTeX project - " opt Name of options - " type 0 if string, 1 if integer, 2 if list - " default Value to return if option not found in latexmkrc file - " - " Output: - " [value, location] - " - " value Option value (integer or string) - " location An integer that indicates where option was found - " -1: not found (default value returned) - " 0: global latexmkrc file - " 1: local latexmkrc file - " - - if a:type == 0 - let l:pattern = '^\s*\$' . a:opt . '\s*=\s*[''"]\(.\+\)[''"]' - elseif a:type == 1 - let l:pattern = '^\s*\$' . a:opt . '\s*=\s*\(\d\+\)' - elseif a:type == 2 - let l:pattern = '^\s*@' . a:opt . '\s*=\s*(\(.*\))' - else - throw 'VimTeX: Argument error' - endif - - " Candidate files - " - each element is a pair [path_to_file, is_local_rc_file]. - let l:files = [ - \ [a:root . '/latexmkrc', 1], - \ [a:root . '/.latexmkrc', 1], - \ [fnamemodify('~/.latexmkrc', ':p'), 0], - \ [fnamemodify( - \ !empty($XDG_CONFIG_HOME) ? $XDG_CONFIG_HOME : '~/.config', ':p') - \ . '/latexmk/latexmkrc', 0] - \] - - let l:result = [a:default, -1] - - for [l:file, l:is_local] in l:files - if filereadable(l:file) - let l:match = matchlist(readfile(l:file), l:pattern) - if len(l:match) > 1 - let l:result = [l:match[1], l:is_local] - break - end - endif - endfor - - " Parse the list - if a:type == 2 && l:result[1] > -1 - let l:array = split(l:result[0], ',') - let l:result[0] = [] - for l:x in l:array - let l:x = substitute(l:x, "^'", '', '') - let l:x = substitute(l:x, "'$", '', '') - let l:result[0] += [l:x] - endfor - endif - - return l:result -endfunction - -" }}}1 - - -let s:compiler = vimtex#compiler#_template#new({ - \ 'name' : 'latexmk', - \ 'callback' : 1, - \ 'continuous': 1, - \ 'executable' : 'latexmk', - \ 'options' : [ - \ '-verbose', - \ '-file-line-error', - \ '-synctex=1', - \ '-interaction=nonstopmode', - \ '-shell-escape', - \ '-output-directory=./output', - \ '-aux-directory=./', - \ ], - \}) - -function! s:compiler.__check_requirements() abort dict " {{{1 - if !executable(self.executable) - call vimtex#log#warning(self.executable . ' is not executable') - throw 'VimTeX: Requirements not met' - endif -endfunction - -" }}}1 -function! s:compiler.__init() abort dict " {{{1 - " Check if .latexmkrc sets the build_dir - if so this should be respected - let l:out_dir = - \ vimtex#compiler#latexmk#get_rc_opt(self.state.root, 'out_dir', 0, '')[0] - if !empty(l:out_dir) - if !empty(self.build_dir) && (self.build_dir !=# l:out_dir) - call vimtex#log#warning( - \ 'Setting out_dir from latexmkrc overrides build_dir!', - \ 'Changed build_dir from: ' . self.build_dir, - \ 'Changed build_dir to: ' . l:out_dir) - endif - let self.build_dir = l:out_dir - endif -endfunction - -" }}}1 -function! s:compiler.__build_cmd() abort dict " {{{1 - let l:cmd = (has('win32') - \ ? 'set max_print_line=2000 & ' - \ : 'max_print_line=2000 ') . self.executable - - let l:cmd .= ' ' . join(self.options) - let l:cmd .= ' ' . self.get_engine() - - if !empty(self.build_dir) - let l:cmd .= ' -outdir=' . fnameescape(self.build_dir) - endif - - if self.continuous - let l:cmd .= ' -pvc -view=none' - - if self.callback - for [l:opt, l:val] in [ - \ ['compiling_cmd', 'vimtex_compiler_callback_compiling'], - \ ['success_cmd', 'vimtex_compiler_callback_success'], - \ ['failure_cmd', 'vimtex_compiler_callback_failure'], - \] - let l:cmd .= s:wrap_option_appendcmd(l:opt, 'echo ' . l:val) - endfor - endif - endif - - return l:cmd . ' ' . vimtex#util#shellescape(self.state.base) -endfunction - -" }}}1 -function! s:compiler.__pprint_append() abort dict " {{{1 - return [ - \ ['callback', self.callback], - \ ['continuous', self.continuous], - \ ['executable', self.executable], - \] -endfunction - -" }}}1 - -function! s:compiler.clean(full) abort dict " {{{1 - let l:cmd = self.executable . ' ' . (a:full ? '-C ' : '-c ') - if !empty(self.build_dir) - let l:cmd .= printf(' -outdir=%s ', fnameescape(self.build_dir)) - endif - let l:cmd .= vimtex#util#shellescape(self.state.base) - - call vimtex#jobs#run(l:cmd, {'cwd': self.state.root}) -endfunction - -" }}}1 -function! s:compiler.get_engine() abort dict " {{{1 - " Parse tex_program from TeX directive - let l:tex_program_directive = self.state.get_tex_program() - let l:tex_program = l:tex_program_directive - - - " Parse tex_program from from pdf_mode option in .latexmkrc - let [l:pdf_mode, l:is_local] = - \ vimtex#compiler#latexmk#get_rc_opt(self.state.root, 'pdf_mode', 1, -1) - - if l:pdf_mode >= 1 && l:pdf_mode <= 5 - let l:tex_program_pdfmode = [ - \ 'pdflatex', - \ 'pdfps', - \ 'pdfdvi', - \ 'lualatex', - \ 'xelatex', - \][l:pdf_mode-1] - - " Use pdf_mode if there is no TeX directive - if l:tex_program_directive ==# '_' - let l:tex_program = l:tex_program_pdfmode - elseif l:is_local && l:tex_program_directive !=# l:tex_program_pdfmode - " Give warning when there may be a confusing conflict - call vimtex#log#warning( - \ 'Value of pdf_mode from latexmkrc is inconsistent with ' . - \ 'TeX program directive!', - \ 'TeX program: ' . l:tex_program_directive, - \ 'pdf_mode: ' . l:tex_program_pdfmode, - \ 'The value of pdf_mode will be ignored.') - endif - endif - - return get(g:vimtex_compiler_latexmk_engines, - \ l:tex_program, - \ g:vimtex_compiler_latexmk_engines._) -endfunction - -" }}}1 - - -function! s:wrap_option_appendcmd(name, value) abort " {{{1 - " Note: On Linux, we use double quoted perl strings; these interpolate - " variables. One should therefore NOT pass values that contain `$`. - let l:win_cmd_sep = has('nvim') ? '^&' : '&' - let l:common = printf('$%s = ($%s ? $%s', a:name, a:name, a:name) - return has('win32') - \ ? printf(' -e "%s . '' %s '' : '''') . ''%s''"', - \ l:common, l:win_cmd_sep, a:value) - \ : printf(' -e ''%s . " ; " : "") . "%s"''', - \ l:common, a:value) -endfunction - -"}}}1 diff --git a/nvim/site/vi.utf-8.spl b/nvim/site/vi.utf-8.spl deleted file mode 100644 index 19d945336d15c3f3a32b583569a8df5a4fcf1417..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20334 zcmbVUYiu0Xb)Gx3!?(DSV#hIy)`+|PlK?FkJE`LaC;|gDEWiO+0j*LsMrm5K9_GU~ z*PD%rGz_y{E3T|cqO8h}WUUxkrc6eZL`5PQhUlzpIIW}~6#~Ht0)-S(1nr-sXaE_8 zoPOUqcjsO%>7=QCjAm!<<2=6exaZ#CUp?~ZvxD27dg@cg1c4d-TJZn*hpx4M(c1q4 z``CQQzaV`cBwtHLlCLMD$v2Wx@()Qlc_G=Id^345`Nw2W@=~%l`KM%GvOhVHj3oz? zmy<)uKPQKiSCUtgZzV^PqseQ@v80k5PsWpPCnu8Elat9C$wYE0c{7(!IhH>wlWQ`I-C zlhvu}cdDnW)73N8v(RgRCpF>z{g z>g>6h^Rsh}Depq76#(1kc_}vWeYf;g@#3e~$Z~~;Ta*{+q!O3*16F!`uEJGmb42Yj zz*mF33`xIk9msKORhk!8w@de%LJ-AtQ(7w-I#o*MmVP&tNJHn-saCaBnmJ^--WD+4+UVI&G?`Jq4g;F2Bkg1#q&r%2;_ZR(Vp8_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