This commit is contained in:
veypi 2022-10-17 15:45:37 +08:00
parent 9cd1989c5c
commit 082b8a69e5
3 changed files with 51 additions and 2 deletions

View File

@ -36,7 +36,8 @@ local servers = {
rust_analyzer = require "lsp.base",
tailwindcss = require "lsp.tailwind",
sqls = require "lsp.sql",
efm = require "lsp.efm"
efm = require "lsp.efm",
html = require "lsp.base"
}
-- 自动安装 LanguageServers
@ -109,6 +110,7 @@ cmp.setup {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'buffer' },
{ name = 'path' }
{ name = 'path' },
{ name = 'omni', }
},
}

View File

@ -17,6 +17,7 @@ return require('packer').startup(function()
use 'hrsh7th/nvim-cmp'
use 'hrsh7th/cmp-path'
use 'hrsh7th/cmp-omni'
use 'hrsh7th/cmp-buffer'
use 'hrsh7th/cmp-nvim-lsp'
use 'saadparwaiz1/cmp_luasnip'
@ -64,4 +65,7 @@ return require('packer').startup(function()
-- [merge]
-- conflictStyle = diff3
use "samoshkin/vim-mergetool"
use 'lervag/vimtex'
end)

View File

@ -10,4 +10,47 @@ let g:license = 'Apache'
" autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()
autocmd BufWritePre * lua vim.lsp.buf.formatting_sync()
filetype plugin indent on
" This enables Vim's and neovim's syntax-related features. Without this, some
" VimTeX features will not work (see ":help vimtex-requirements" for more
" info).
syntax enable
" Viewer options: One may configure the viewer either by specifying a built-in
" viewer method:
let g:vimtex_view_enabled = 1
let g:vimtex_view_method = 'zathura'
" Or with a generic interface:
" let g:vimtex_view_general_viewer = 'okular'
" let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
" VimTeX uses latexmk as the default compiler backend. If you use it, which is
" strongly recommended, you probably don't need to configure anything. If you
" want another compiler backend, you can change it as follows. The list of
" supported backends and further explanation is provided in the documentation,
" see ":help vimtex-compiler".
let g:vimtex_compiler_method = 'latexmk'
let g:vimtex_compiler_latexmk = {
\ 'build_dir' : './build',
\ 'callback' : 1,
\ 'continuous' : 1,
\ 'executable' : 'latexmk',
\ 'hooks' : [],
\ 'options' : [
\ '-pvc',
\ '-xelatex',
\ '-verbose',
\ '-file-line-error',
\ '-synctex=1',
\ '-interaction=nonstopmode',
\ ],
\ }
" Most VimTeX mappings rely on localleader and this can be changed with the
" following line. The default is usually fine and is the symbol "\".
" let maplocalleader = ","