Comments (2)
Aahh perfect thanks for the quick reply
from mini.nvim.
This (not adding trailing comma) is the default behavior. Customizing it for specific languages is left to users. The dedicated customization approach is via hooks with built-in gen_hooks
table containing several most common cases. Handling of trailing comma included.
This is use case can be resolved by creating '~/.config/nvim/after/ftplugin/go.lua' with the following content:
if _G.MiniSplitjoin ~= nil then
local gen_hook = MiniSplitjoin.gen_hook
local parens = { brackets = { '%b()' } }
-- Add trailing comma when splitting inside parenthesis
local add_comma_parens = gen_hook.add_trailing_separator(parens)
-- Delete trailing comma when joining inside parenthesis
local del_comma_parens = gen_hook.del_trailing_separator(parens)
vim.b.minisplitjoin_config = {
split = { hooks_post = { add_comma_parens } },
join = { hooks_post = { del_comma_parens } },
}
end
from mini.nvim.
Related Issues (20)
- Italic options for mini.hues HOT 1
- mini.files to work better without acd HOT 1
- (misc): setup_termbg_sync reset can spuriously fail HOT 9
- Add git log --graph functionality like rbong/vim-flog HOT 1
- Strange `gs` mapping with `Sleep` comment HOT 3
- Invalid `cwd` passed to `H.git_cli_output` in `MiniGit.show_at_cursor` temporarily hangs Neovim HOT 1
- (misc): `setup_termbg_sync` breaks firenvim HOT 1
- Follow global system-wide dark mode preference HOT 1
- mini.animate scroll to respect scrolloff settings HOT 1
- mini.clue default bindings support HOT 1
- mini.run: simple run configs manager in your editor HOT 2
- mini.statusline: disable statusline per buffer HOT 1
- mini.git: when visiting the diff file of HEAD, `show_at_cursor()` opens the current file instead of a snapshot HOT 6
- mini.starter fuzzy find HOT 1
- Option to disable setup_termbg_sync() compatibility layer with modern terminals HOT 8
- Cannot select or filter LSP document/workspace symbols HOT 2
- `mini.indentscope` doesn't play well with `showbreak` option HOT 1
- New mini.cmdline module to show UI like folke/noice.nvim HOT 1
- MiniSession.read() not triggering Treesitter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mini.nvim.