Enjoy the detours!

neovim

Now we are getting pretty with dressing.nvim. Which is basically making the input of code-refactor.lua look nice.

Config

return {
	"stevearc/dressing.nvim",
	dependencies = {
		"nvim-telescope/telescope.nvim",
	},
	config = function()
		require("dressing").setup({
			select = {
				telescope = require("telescope.themes").get_cursor(),
			},
		})
	end,
}

Besides improving the input of code-refactor.lua, this plugin isn't doing anything special in my setup. So I could basically remove the select config for telescope. I always thought it will improve it. 🤷


71 of #100DaysToOffload

#log #neovim

Thoughts? Discuss...

The second plugin I want to show is code-refactor.lua. Which is a neat little helper for JS/TS Projects without the need for an LSP.

Config

return {
	"jdrupal-dev/code-refactor.nvim",
	dependencies = { "nvim-treesitter/nvim-treesitter" },
	keys = {
		{ "<leader>a", "<cmd>CodeActions all<CR>", desc = "Show code-refactor.nvim (not LSP code actions)" },
	},
	config = function()
		require("code-refactor").setup()
	end,
}

The config is nothing special. Just changed the key to <leader>a. Which opens a small floating window with possible code-actions.

Because I work 99% of the time in a React.js environment where arrow functions are used everywhere, it is handy to have a code action where I can toggle it into a normal function.


70 of #100DaysToOffload

#log #neovim

Thoughts? Discuss...

I thought of trying a little series and showing off some neovim plugins I use on a daily basis.

To start somewhere, I'll go alphabetically with autopairs.lua.

Config

return {
	"windwp/nvim-autopairs",
	opts = {
		fast_wrap = {
			highlight = "IncSearch",
		}, -- setup function and press <M-e> to use fast_wrap
		check_ts = true,
		map_c_h = true,
	},
}

For autopairs, I like it if it doesn't get in my way, and autopairs.lua does a good job here. The feature I love the most is fast_wrap. You simply hit <M-e and it will ask you where you want to wrap it. Simple and clean. :)

That's it. A plugin I wish would be shipped with Neovim already.


61 of #100DaysToOffload

#log #neovim

Thoughts? Discuss...

Some days ago, my GitHub Copilot subscription ended, and I decided to switch to another paid auto-completion service.

Overall, I was ok with what GH Copilot delivered. But I heard a lot about the new kids in town and wanted to explore them. I was split between Codium and Supermaven and decided for Supermaven after their announcement that they will join Cursor.

Weiterlesen...