Compare commits
4 Commits
67b668bf60
...
eb17aca1fc
| Author | SHA1 | Date | |
|---|---|---|---|
|
eb17aca1fc
|
|||
|
cdf15743c3
|
|||
|
29eb480ac0
|
|||
|
3148fa47c2
|
@@ -13,6 +13,9 @@ vim.o.mouse = ""
|
||||
vim.o.mousescroll = "ver:0,hor:0"
|
||||
vim.o.writebackup = false
|
||||
vim.o.undofile = true
|
||||
vim.o.updatetime = 250
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
|
||||
-- ui
|
||||
vim.o.breakindent = true
|
||||
|
||||
@@ -5,6 +5,7 @@ MiniDeps.now(function()
|
||||
vim.g.gruvbox_material_background = "light"
|
||||
vim.g.gruvbox_material_better_performance = 1
|
||||
vim.g.gruvbox_material_diagnostic_line_highlight = 1
|
||||
vim.g.gruvbox_material_diagnostic_text_highlight = 1
|
||||
vim.g.gruvbox_material_diagnostic_virtual_text = "colored"
|
||||
vim.g.gruvbox_material_enable_bold = 1
|
||||
vim.g.gruvbox_material_enable_italic = 1
|
||||
|
||||
@@ -2,7 +2,7 @@ MiniDeps.later(function()
|
||||
MiniDeps.add("neovim/nvim-lspconfig")
|
||||
|
||||
vim.lsp.enable({
|
||||
"pyright",
|
||||
"basedpyright",
|
||||
"ts_ls",
|
||||
"rust_analyzer",
|
||||
"clangd",
|
||||
@@ -58,6 +58,36 @@ MiniDeps.later(function()
|
||||
"format"
|
||||
)
|
||||
|
||||
local tD_dH = vim.lsp.protocol.Methods.textDocument_documentHighlight
|
||||
if client and client.supports_method(tD_dH) then
|
||||
local ag = vim.api.nvim_create_augroup
|
||||
local ac = vim.api.nvim_create_autocmd
|
||||
local g = ag("custom-lsp-tD_dH-highlight", { clear = false })
|
||||
|
||||
ac({ "CursorHold", "CursorHoldI" }, {
|
||||
buffer = bufnr,
|
||||
group = g,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
})
|
||||
|
||||
ac({ "CursorMoved", "CursorMovedI" }, {
|
||||
buffer = bufnr,
|
||||
group = g,
|
||||
callback = vim.lsp.buf.clear_references,
|
||||
})
|
||||
|
||||
ac("LspDetach", {
|
||||
group = ag("custom-lsp-detach", { clear = true }),
|
||||
callback = function(e)
|
||||
vim.lsp.buf.clear_references()
|
||||
vim.api.nvim_clear_autocmds({
|
||||
group = "custom-lsp-tD_dH-highlight",
|
||||
buffer = e.buf,
|
||||
})
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- inlay hints
|
||||
if client and client.server_capabilities.inlayHintProvider then
|
||||
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
|
||||
|
||||
@@ -1,10 +1,29 @@
|
||||
MiniDeps.later(
|
||||
function()
|
||||
require("mini.indentscope").setup({
|
||||
draw = {
|
||||
delay = 0,
|
||||
animation = require("mini.indentscope").gen_animation.none(),
|
||||
},
|
||||
})
|
||||
MiniDeps.later(function()
|
||||
require("mini.indentscope").setup({
|
||||
draw = {
|
||||
delay = 0,
|
||||
animation = require("mini.indentscope").gen_animation.none(),
|
||||
},
|
||||
})
|
||||
|
||||
local disable = {
|
||||
"fzf",
|
||||
"fzflua_backdrop",
|
||||
"qf",
|
||||
}
|
||||
|
||||
local disable_set = {}
|
||||
for _, v in ipairs(disable) do
|
||||
disable_set[v] = true
|
||||
end
|
||||
)
|
||||
|
||||
local function term_disable(args) vim.b[args.buf].miniindentscope_disable = true end
|
||||
local function ft_disable(args)
|
||||
local ft = vim.bo[args.buf].filetype
|
||||
if disable_set[ft] == nil then return end
|
||||
vim.b[args.buf].miniindentscope_disable = true
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("TermOpen", { callback = term_disable })
|
||||
vim.api.nvim_create_autocmd("Filetype", { callback = ft_disable })
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user