Skip to content

Commit ab519dd

Browse files
committed
Replaced coerce.nvim with text-case.nvim
1 parent 3f67f6d commit ab519dd

File tree

2 files changed

+41
-13
lines changed

2 files changed

+41
-13
lines changed

.config/nvim/lazy-lock.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
1010
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
1111
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
12-
"coerce.nvim": { "branch": "main", "commit": "b7927c42bd7f3adaae5f5dcf86a89140d5d80430" },
1312
"conform.nvim": { "branch": "master", "commit": "70019124aa4f2e6838be9fbd2007f6d13b27a96d" },
14-
"coop.nvim": { "branch": "main", "commit": "01108731b52828f6bca4b4e962f29ee773dfbbbd" },
1513
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
1614
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" },
1715
"feline.nvim": { "branch": "main", "commit": "9f1313f61a75ec5ebe805fedd46bdc130c420963" },
@@ -63,6 +61,7 @@
6361
"telescope-undo.nvim": { "branch": "main", "commit": "2971cc9f193ec09e0c5de3563f99cbea16b63f10" },
6462
"telescope-zf-native.nvim": { "branch": "master", "commit": "5721be27df11a19b9cd95e6a4887f16f26599802" },
6563
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
64+
"text-case.nvim": { "branch": "main", "commit": "e898cfd46fa6cde0e83abb624a16e67d2ffc6457" },
6665
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
6766
"tsc.nvim": { "branch": "main", "commit": "59abb6f3f24a3ca80708f694af4e2b727a1a3211" },
6867
"vim-matchup": { "branch": "master", "commit": "aca23ce53ebfe34e02c4fe07e29e9133a2026481" },

.config/nvim/lua/plugins/other.lua

+40-11
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,49 @@ return {
1111
end,
1212
},
1313
{
14-
-- TODO remove and replace with https://github.com/johmsalas/text-case.nvim
15-
'gregorias/coerce.nvim',
16-
version = '*',
14+
'johmsalas/text-case.nvim',
1715
keys = {
18-
{ 'cr' },
19-
{ 'gcr', mode = { 'n', 'x' } },
16+
{
17+
-- k for "kebab-case"
18+
'crk',
19+
function()
20+
require('textcase').current_word('to_dash_case')
21+
end,
22+
},
23+
{
24+
'crc',
25+
function()
26+
require('textcase').current_word('to_camel_case')
27+
end,
28+
},
29+
{
30+
'crl',
31+
function()
32+
require('textcase').current_word('to_snake_case')
33+
end,
34+
},
35+
{
36+
'crp',
37+
function()
38+
require('textcase').current_word('to_pascal_case')
39+
end,
40+
},
41+
{
42+
'cru',
43+
function()
44+
require('textcase').current_word('to_constant_case')
45+
end,
46+
},
47+
-- this does not fully work yet
48+
{
49+
'crt',
50+
function()
51+
require('textcase').current_word('to_title_case')
52+
end,
53+
},
2054
},
2155
opts = {
22-
default_mode_keymap_prefixes = {
23-
normal_mode = 'cr',
24-
-- I don't like them but at least they don't break anything
25-
motion_mode = 'gC',
26-
visual_mode = 'gC',
27-
},
56+
default_keymappings_enabled = false,
2857
},
2958
},
3059

0 commit comments

Comments
 (0)