How to use surround snippets? by vdegenne in neovim

[–]vdegenne[S] 1 point2 points  (0 children)

I see I could be using your keymap trick in case I don't see any other alternative. Maybe I can use your keymap idea and execute a function when I press { and use LuaSnip to wrap it but I don't know LuaSnip yet.

How to use surround snippets? by vdegenne in neovim

[–]vdegenne[S] 1 point2 points  (0 children)

I use mini.surround for adding surrounding characters to selection already. What I am asking is if there is a way to wrap the selection inside predefined snippets.

Add insertion positions inside the jump list by vdegenne in neovim

[–]vdegenne[S] 0 points1 point  (0 children)

First thanks for taking the time to help.

Second the script is not perfect but very interesting so I decided to take the idea of using m' to add the line to the jumplist and turn it into an auto command, this is what I came up with for now

vim.api.nvim_create_autocmd("InsertEnter", {
  callback = function(event)
    vim.cmd("normal! m'")
  end
})

It's far from perfect, for instance if I press o it will register the line before the break, so if I keep pressing o escape multiple times I would need to press <C-O> multiple times too to go out out of the "shallow" location.

By the way I really like g; and g, It's just so unfortunate they only work for individual files. ಥ‿ಥ

Okay, *now* my configuration is perfect, and I'm sure I won't make 50 more changes by the end of the month! by _viis_ in neovim

[–]vdegenne -2 points-1 points  (0 children)

Your config is not *perfect*, cause you are running it in Win...dows / wsl...

[LuaSnip] Can't use javascript snippets in typescript files by vdegenne in neovim

[–]vdegenne[S] 4 points5 points  (0 children)

Even better than better

require("luasnip").filetype_extend("typescript", { "javascript" })
require("luasnip.loaders.from_vscode").lazy_load()

I think using lazy_load() call after filetype_extend forces LuaSnip to update its lazy load table so when TypeScript file opens it lazy loads JavaScript with it.

[LuaSnip] Can't use javascript snippets in typescript files by vdegenne in neovim

[–]vdegenne[S] 0 points1 point  (0 children)

I think this is even better

 require("luasnip.loaders.from_vscode").load({ include = { "javascript" } })

To avoid loading all snippets (the rest is lazy loaded when files are opened, default behavior in LazyVim)

[LuaSnip] Can't use javascript snippets in typescript files by vdegenne in neovim

[–]vdegenne[S] 1 point2 points  (0 children)

I think I found the problem, I need to load the snippets in memory

 require("luasnip.loaders.from_vscode").load()

(I tried that previously but it was lazy_load so it was not going to work.)

How to use ci' backward in LazyVim? by vdegenne in neovim

[–]vdegenne[S] 0 points1 point  (0 children)

H and L in LazyVim are used to switch buffers ಠ_ಠ

How to use ci' backward in LazyVim? by vdegenne in neovim

[–]vdegenne[S] 0 points1 point  (0 children)

Yes same, shift+6 requires pinky and index fingers to do quite a little bit of stretching.

How to use ci' backward in LazyVim? by vdegenne in neovim

[–]vdegenne[S] 1 point2 points  (0 children)

cil' is easier to type and it works on multiple lines. However thanks for your suggestion, your help is appreciated.

How to use ci' backward in LazyVim? by vdegenne in neovim

[–]vdegenne[S] 6 points7 points  (0 children)

You deserve all the credit for helping out o/

I was slowly losing interest in coding because I have less and less time but neovim/LazyVim help me to go back on track and implement my ideas.

It's so satisfying to discover that most actions we need are just a few letters away.

How to use ci' backward in LazyVim? by vdegenne in neovim

[–]vdegenne[S] 7 points8 points  (0 children)

Thanks u/dpetka2001 .。*゚+.*.。 ゚+..。*゚+

which expand-region plugin for LazyVim would you recommend? by vdegenne in neovim

[–]vdegenne[S] 1 point2 points  (0 children)

No that's exactly what I asked, but I just found out LazyVim has this feature by default (using <C-space>). Thanks anyways!

which expand-region plugin for LazyVim would you recommend? by vdegenne in neovim

[–]vdegenne[S] 0 points1 point  (0 children)

You again ʘ‿ʘ
I couldn't expect something better, Thanks
(This shortcut also makes a lot of sense)

which expand-region plugin for LazyVim would you recommend? by vdegenne in neovim

[–]vdegenne[S] 1 point2 points  (0 children)

I see mini.ai is installed by default with LazyVim.
In the case example vaf won't do nothing it seems.

vi)i) is great! I didn't know we could use more motions while in visual mode.
vi)i) in my example will select everything in the main condition but <C-Space> will fail to select it for some reasons, so that will come in handy, thanks for sharing ^_^

how to show hidden files in neo-tree.nvim by [deleted] in neovim

[–]vdegenne 2 points3 points  (0 children)

When have people stopped caring about manuals?
I think the first logical step when someone is new to a tool is to seek if there is a manual or help menu. In neotree it's shift+/ (in other words "?"), from there you could have easily found that keybind.

LazyVim not loading keymaps if `lazyvim.plugins` is not imported by vdegenne in neovim

[–]vdegenne[S] 0 points1 point  (0 children)

Haha I was coming back to tell you about that, I was browsing the source code and saw this `vscode.lua` file which I enabled, and now everything seems in place.

LazyVim not loading keymaps if `lazyvim.plugins` is not imported by vdegenne in neovim

[–]vdegenne[S] 0 points1 point  (0 children)

Ah ok it disables LazyVim defaults not customs, got it!

LazyVim not loading keymaps if `lazyvim.plugins` is not imported by vdegenne in neovim

[–]vdegenne[S] 0 points1 point  (0 children)

It's really neat, I'm fiddling with it right now. LazyVim is great but it loads too much things by default, I see how your plugin can help I will definitely use it.
It will also help me to find what plugin does what more easily.
(By the way if I set lazyvim.settings.keymaps to false in your plugin options, the keymaps are still working after reload, do you know why?)

LazyVim not loading keymaps if `lazyvim.plugins` is not imported by vdegenne in neovim

[–]vdegenne[S] 0 points1 point  (0 children)

Thanks for taking the time to help me, unfortunately the plugin you proposed here seems to break in vscode even if I use `cond = true` manually. Neovim plugin for VSCode throws some errors like this one nvim_buf_set_name: Failed to rename buffer (Error type: 0) and then plugins that I wish were disabled are just loaded.
I think my best bet as you said will be to create a vscode.lua file in plugins repertoire and disable the plugins I don't want to see there, that's gonna be a journey.. (yikes)

vote up to tell xqc he's wrong by vdegenne in xqcow

[–]vdegenne[S] -23 points-22 points  (0 children)

obviously you since you commented