chore: improve nvim-ufo

main
sudo pacman -Syu 2023-11-09 15:32:08 +07:00
parent d79e298cdb
commit 7fb0ff0474
2 changed files with 14 additions and 8 deletions

View File

@ -2,8 +2,8 @@
include mocha.conf
# https://sw.kovidgoyal.net/kitty/conf/#fonts
font_family Sudo Var
font_size 18.0
font_family 0xProto
font_size 14.0
# kitty +list-fonts --psnames
modify_font cell_height 120%

View File

@ -325,11 +325,7 @@ require("lazy").setup({
vim.keymap.set("n", "zR", ufo.openAllFolds)
vim.keymap.set("n", "zM", ufo.closeAllFolds)
ufo.setup({
provider_selector = function(bufnr, filetype, buftype)
return { "treesitter", "indent" }
end,
})
ufo.setup()
end,
},
@ -438,6 +434,13 @@ require("lazy").setup({
config = function()
local lspconfig = require("lspconfig")
-- Support nvim-ufo
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true,
}
-- Go
-- https://github.com/golang/tools/blob/master/gopls/doc/vim.md
-- https://github.com/golang/tools/blob/master/gopls/doc/settings.md
@ -450,11 +453,14 @@ require("lazy").setup({
usePlaceholders = true,
},
},
capabilities = capabilities,
})
-- Proto
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#bufls
lspconfig.bufls.setup({})
lspconfig.bufls.setup({
capabilities = capabilities,
})
-- General
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev)