Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Mr-LLLLL/utilities.nvim
The repository is collect some little utility in Neovim
https://github.com/Mr-LLLLL/utilities.nvim
Last synced: 7 days ago
JSON representation
The repository is collect some little utility in Neovim
- Host: GitHub
- URL: https://github.com/Mr-LLLLL/utilities.nvim
- Owner: Mr-LLLLL
- Created: 2024-03-11T02:15:42.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-07-06T02:50:36.000Z (4 months ago)
- Last Synced: 2024-08-02T06:23:31.220Z (3 months ago)
- Language: Lua
- Size: 62.5 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-neovim - Mr-LLLLL/utilities.nvim - A repository to collect some little utility functions. (Utility / Cursorline)
README
# utilities.nvim
> The repository is collect some little utility in Neovim![Screencasts](https://github.com/Mr-LLLLL/media/blob/master/utilities/smart_move.gif)
## Installation
With [lazy.nvim](https://github.com/folk/lazy.nvim):
``` lua
{
"Mr-LLLLL/utilities.nvim",
event = "VeryLazy",
opts = {
-- always use `q` to quit preview windows
-- NOTE: remapping `q` to `qq`. in case `q` always press by mistake
quit_with_q = true,
-- in qf window, use jump to
jump_quickfix_item = true,
-- define some useful keymap for generic. details see init_keymap function
map_with_useful = true,
-- when hit will pop stack and centerize
-- if want to centerize for jump definition, implementation, references, you can used like:
-- vim.keymap.set(
-- 'n',
-- '',
-- function()
-- require("utilities.nvim").
-- list_or_jump("textDocument/definition", require("telescope.builtin").lsp_definitions)
-- end,
-- {})
-- but this is need telescope when result is greater one
ctrl_t_with_center = true,-- NOTE: require nvim-treesitter-textobjects
-- smart move behavior only support languages {Lua, Golang, Rust, Http}
-- others language will moved like nvim-treesitter-textobjects
smart_move_textobj = {
disabled = false,
-- disabled filetype, default support all language just like nvim-treesitter-textobjects behavior
disabled_filetypes = { "git" },
-- if you want to only support some filetypes, uncomment it and fill your language
-- enabled_filetypes = {},
mapping = {
prev_func_start = "[[",
next_func_start = "]]",
prev_func_end = "[]",
next_func_end = "][",prev_class_start = "[m",
next_class_start = "]m",
prev_class_end = "[M",
next_class_end = "]M",
}
}
}
```