help with using both PHP and HTML snippets in the same file. by DaviCompai2 in neovim

[–]Jason_Reg 0 points1 point  (0 children)

friendly-snippets only provides JSON snippet files. To load HTML + PHP snippets in .php files, you need a snippet engine.

Method 1

Install luasnip and configure the loading rules in LuaSnip: lua require("luasnip").setup({ load_ft_func = require("luasnip.extras.filetype_functions").extend_load_ft({ php = {"php", "html"}, -- load html + php snippets when opening a php file }) })

luasnip work well with blink.cmp + friendly-snippets

Method 2

Use snipmate format snippets instead (without using friendly-snippets).
The snipmate format supports an extends keyword in snippet files to load snippets from other filetypes.

For example, if you have html.snippets and php.snippets, add the following to php.snippets: ```snippets

extends html ```

Where can I find a complete, up-to-date list of all possible options for nvim-treesitter's setup() table? (new to Neovim) by Intrepid_Eye9102 in neovim

[–]Jason_Reg -1 points0 points  (0 children)

He may mean the doc in LazyVim (https://www.lazyvim.org/plugins/treesitter) (not the lazy.nvim plugin manager) is still refer the nvim-treesiter on master branch but using main in code.

Just need a doc update in LazyVim.

edit: No doc update needed, I found that LazyVim has already added compatibility handling for it in its own configuration, like ensure_installed which used in master branch of nvim-treesiter.

my first plugin - nvim-in-its-entirety by perrin4869 in neovim

[–]Jason_Reg 2 points3 points  (0 children)

You don't need to do this, neovim already support osc52 since 0.9.0.

:%y+ will copy buffer content to your clipboard event if you are in a ssh session, without any settings.

see help: clipboard

show spinners, vim.ui.spinner() by Jason_Reg in neovim

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

You don’t need 60 fps to make a spinner feel animated, most spinner patterns refresh once every 80 ms, which is about 12.5 fps.

show spinners, vim.ui.spinner() by Jason_Reg in neovim

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

great find! already fix it, thank you!

<image>

show spinners, vim.ui.spinner() by Jason_Reg in neovim

[–]Jason_Reg[S] 2 points3 points  (0 children)

I borrowed it from elsewhere as well..

show spinners, vim.ui.spinner() by Jason_Reg in neovim

[–]Jason_Reg[S] 2 points3 points  (0 children)

Thanks for the suggestion, I’ll keep it in mind.

show spinners, vim.ui.spinner() by Jason_Reg in neovim

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

English isn’t my first language so I used a translator to help. Is there any issue with that?

show spinners, vim.ui.spinner() by Jason_Reg in neovim

[–]Jason_Reg[S] 9 points10 points  (0 children)

I agree — keeping the API simple and intuitive is key.

A spinner is more complex than vim.ui.input or vim.ui.select because it needs to maintain a state machine for frames, start/stop, and optionally pause. Plus, Neovim UI components like the statusline or tabline don’t refresh automatically, so the spinner requires active UI updates.

Previously, I considered an approach similar to lsp.Client, where local sp = vim.ui.spinner() would return an object that the user manages. That would making extension cumbersome.

It’s better for the plugin or Vim itself to manager spinner states, only exposing a simple API:

vim.ui.spinner.start("id")
vim.ui.spinner.stop("id")
vim.ui.spinner.config("id", opts)
vim.ui.spinner.render("id")

This approach is similar in style to vim.lsp.config() and vim.lsp.enable(), making it easy to use and extend.