update
This commit is contained in:
@ -3,12 +3,11 @@ vim.lsp.config('tinymist', {
|
||||
settings = {
|
||||
formatterPrintWidth = 100, -- can't stand 120
|
||||
formatterMode = "typstyle", -- or typstfmt
|
||||
-- exportPdf = "onDocumentHasTitle", -- default: never
|
||||
semanticTokens = "enable"
|
||||
exportPdf = "onSave", -- "onDocumentHasTitle", -- default: never
|
||||
semanticTokens = "enable",
|
||||
},
|
||||
single_file_support = true,
|
||||
-- root_dir = function(_, bufnr)
|
||||
-- return vim.fs.root(bufnr, { ".git" }) or vim.fn.expand "%:p:h"
|
||||
-- end,
|
||||
root_dir = function(bufnr, callback)
|
||||
callback(vim.fs.root(bufnr, { ".git" }) or vim.fn.expand "%:p:h")
|
||||
end,
|
||||
})
|
||||
|
||||
|
@ -17,5 +17,11 @@ vim.api.nvim_create_autocmd("LspAttach", { -- Overrides the de
|
||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, { buffer = args.buf })
|
||||
end
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||
pattern = { "*" },
|
||||
callback = function() vim.o.bomb = (vim.o.fileencoding == "utf-16" or vim.o.fileencoding == "utf-16le") end
|
||||
})
|
||||
|
||||
--vim.api.nvim_create_autocmd("CursorHold", { callback = lsp.document_highlight })
|
||||
--vim.api.nvim_create_autocmd("CursorMoved", { callback = lsp.clear_references })
|
||||
|
@ -25,7 +25,7 @@ o.mouse = "a"
|
||||
o.spell = false
|
||||
o.spelllang = "en_us,uk"
|
||||
o.spelloptions = "camel"
|
||||
o.fileencodings = "utf-8,cp1251,cp866"
|
||||
-- o.fileencodings = "utf-8,cp1251,cp866"
|
||||
--o.clipboard = "unnamed"plus?
|
||||
o.iskeyword:append "-" -- is part of the word
|
||||
o.formatoptions:append "n" -- indents for numbered lists
|
||||
|
Reference in New Issue
Block a user