clean up legacy files
This commit is contained in:
parent
638ff2812f
commit
bc35923fe2
658 changed files with 196 additions and 1 deletions
38
legacy/lua/init.lua
Normal file
38
legacy/lua/init.lua
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
vim.o.foldmethod = 'expr'
|
||||
vim.o.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
signs = true,
|
||||
underline = false,
|
||||
update_in_insert = false,
|
||||
severity_sort = true,
|
||||
float = {
|
||||
border = "single",
|
||||
source = "always" -- Or "if_many"
|
||||
}
|
||||
})
|
||||
|
||||
local signs = {Error = "● ", Warn = "● ", Hint = "● ", Info = "● "}
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, {text = icon, texthl = hl, numhl = hl})
|
||||
end
|
||||
|
||||
local border = {
|
||||
{"┌", "FloatBorder"}, {"─", "FloatBorder"}, {"┐", "FloatBorder"},
|
||||
{"│", "FloatBorder"}, {"┘", "FloatBorder"}, {"─", "FloatBorder"},
|
||||
{"└", "FloatBorder"}, {"│", "FloatBorder"}
|
||||
}
|
||||
|
||||
vim.lsp.handlers["textDocument/hover"] =
|
||||
vim.lsp.with(vim.lsp.handlers.hover, {border = "single"})
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] =
|
||||
vim.lsp.with(vim.lsp.handlers.signature_help, {border = "single"})
|
||||
|
||||
local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
|
||||
function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
|
||||
opts = opts or {}
|
||||
opts.border = opts.border or border
|
||||
return orig_util_open_floating_preview(contents, syntax, opts, ...)
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue