nvim: replace highlight yank plugin with autocmd

This commit is contained in:
2023-07-08 15:20:42 +03:00
parent 4cc80888fb
commit 169a3aba2e
3 changed files with 25 additions and 11 deletions

View File

@ -28,3 +28,11 @@ vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter", "CursorHold", "CursorHo
vim.api.nvim_create_user_command("Agenda", function() vim.api.nvim_create_user_command("Agenda", function()
require("orgmode").action("agenda.prompt") require("orgmode").action("agenda.prompt")
end, {}) end, {})
-- highlight selected area on yank
vim.api.nvim_create_autocmd("TextYankPost", {
pattern = "*",
callback = function()
require("vim.highlight").on_yank({ "IncSearch", 1000 })
end,
})

View File

@ -150,19 +150,10 @@ require("packer").startup(function()
after = "nvim-treesitter", after = "nvim-treesitter",
}) })
--
-- qol
--
-- highlight yank
use({
"machakann/vim-highlightedyank",
event = "TextYankPost",
})
-- --
-- org mode -- org mode
-- --
use({ use({
"nvim-orgmode/orgmode", "nvim-orgmode/orgmode",
after = "nvim-treesitter", after = "nvim-treesitter",

View File

@ -11,4 +11,19 @@ local lsp = require("lspconfig")
-- }, -- },
-- }, -- },
-- }) -- })
require("lspconfig").jedi_language_server.setup({}) lsp.gopls.setup({})
lsp.clangd.setup({})
lsp.texlab.setup({})
lsp.tsserver.setup({})
lsp.svelte.setup({})
lsp.rust_analyzer.setup({})
lsp.sumneko_lua.setup({
settings = {
Lua = {
runtime = { version = "LuaJIT", },
diagnostics = { globals = { "vim" }, },
workspace = { library = vim.api.nvim_get_runtime_file("", true), },
telemetry = { enable = false, },
},
},
})