> ~ biozz / Blog

Plugins from Trixy NeoVim distro 2023-09-17

A set of plugins that I found interesting in Trixy NeoVim distro

Reading time: 3m (477 words)

It has been a couple of months since I stumbled onto Trixy NeoVim distro. I actually don’t think it is a full fledged distro, like NvChad or LazyVim. It is more of a set of plugins well put together.

So in this post I want to highlight some of the plugins I borrowed from this build and really enjoyed using so far.

hlchunk

This is a really fast plugin that highlights blocks of code. And it also look really good.

In the past I used echasnovski/mini.indentscope and before that lukas-reineke/indent-blankline.nvim. Those two are very slow, compared to hlchunk.nvim.

My config is very minimal at the moment:

require("hlchunk").setup({
  chunk = { notify = false },
	blank = { enable = false },
})

I had a small issue on nightly with it, but the author was very fast to explain and fix it.

harpoon

This is basically marks on steroids. I just added Telescope integration, because I use Telescope everywhere and a couple more maps to easily set and show all of my marks.

Here is my config:

require("harpoon").setup({ tabline = true })
require("telescope").load_extension("harpoon")
vim.keymap.set("n", "<leader>tm", function() require("telescope").extensions.harpoon.marks() end, { noremap = true })
vim.keymap.set("n", "m", function() require("harpoon.mark").add_file() end, { noremap = true })
vim.keymap.set("n", "<leader>hm", function() require("harpoon.ui").toggle_quick_menu() end, { noremap = true })

One of the things I miss in this plugin is the ability to rename marks.

spider

This is a game changer for words navigation. It adds the ability to jump to CamelCaseWords inside the word using w and b. Not much to add here besides my config:

local spider = require("spider")
require("spider").setup({ skipInsignificantPunctuation = false })
vim.keymap.set({ "n" }, "w", function() spider.motion("w") end, { desc = "Spider-w" })
vim.keymap.set({ "n" }, "b", function() spider.motion("b") end, { desc = "Spider-b" })

lsp-zero

I always had difficulties setting up LSP configs. Turns out there is a plugin for that. I migrated to lsp-zero with this config:

local lsp_zero = require("lsp-zero")
lsp_zero.extend_lspconfig()

lsp_zero.on_attach(function(client, bufnr)
	-- :h lsp-zero-keybindings
	local opts = { noremap = true, silent = true, buffer = bufnr }
	vim.keymap.set("n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
	vim.keymap.set("n", "<C-LeftMouse>", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
	vim.keymap.set("n", "<M-CR>", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts)

	lsp_zero.default_keymaps({ buffer = bufnr })
end)
lsp_zero.setup_servers({
	"gopls",
	"quick_lint_js",
	"emmet_language_server",
})

Ofcourse, there are much LSP servers in my config and the best thing is you add new servers with one line.

You can also customize the servers as usual. Here is an example with my configuration of pyright language server:

require("lspconfig").pyright.setup({
	settings = {
		pylsp = {
			plugins = {
				pyflakes = { enabled = false },
				pylint = { enabled = false },
				pycodestyle = { ignore = { "E501", "W503" } },
				mccabe = { enabled = false },
			},
		},
	},
})

And there you have it. My highlights of the plugins from the Trixy build. No Plugins Graveyard today. See you next time on NeoVim series!

More posts in NeoVim Config series:

There is nothing in here at the moment