make lsp some changes and a easy new file

This commit is contained in:
gameloader
2022-10-20 10:30:00 +08:00
parent e1ecbd9818
commit 1941ccef40
8 changed files with 111 additions and 37 deletions

View File

@ -9,6 +9,20 @@ return {
client.server_capabilities.document_formatting = false
client.server_capabilities.document_range_formatting = false
vim.api.nvim_create_autocmd("CursorHold", {
buffer = bufnr,
callback = function()
local opts = {
focusable = false,
close_events = { "BufLeave", "CursorMoved", "InsertEnter", "FocusLost" },
border = "rounded",
source = "always",
prefix = " ",
scope = "cursor",
}
vim.diagnostic.open_float(nil, opts)
end,
})
-- local function buf_set_keymap(...)
-- vim.api.nvim_buf_set_keymap(bufnr, ...)
-- end