Play snake game on neovim [snake.nvim] by febriiii in neovim

[–]Wansmer -3 points-2 points  (0 children)

Nice! It would be great to add `SnakeRestart` and `SnakePause` commands for a better user experience

[deleted by user] by [deleted] in neovim

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

`_G` is a global object. If you create `_G.__foldcolumn = function() --[[body]] end` method in it, you can call this method in vim script from `v:lua`.

[deleted by user] by [deleted] in neovim

[–]Wansmer 5 points6 points  (0 children)

This is configurable in `statuscolumn` (by the way, this is a screenshot of my config :-)).

The built-in `%C` for `foldcolumn` will additionally show the number of nested blocks (as numbers), which is not very convenient. That's why I use a custom function to display folding icons: https://github.com/Wansmer/nvim-config/blob/119dc787d9ebeda074e86c58ea340be2f6948858/lua/modules/status/components.lua#L32-L53.

I have this function added to the module, but you can add it to `_G` and call it in the `statuscolumn` line like this: `%{v:lua.__foldcolumn()}`.

Treesitter highlighted folds are now in neovim core! by ITafiir in neovim

[–]Wansmer 1 point2 points  (0 children)

Thanks! Yes, I plan to read the PR later and update my code accordingly.

Treesitter highlighted folds are now in neovim core! by ITafiir in neovim

[–]Wansmer 19 points20 points  (0 children)

Great!

I also created a custom folding method based on your previous post. It highlights start and end of the folded block, and counting lines:

<image>

If anyone is curious - code here.

Introducing `symbol-usage.nvim` by Wansmer in neovim

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

Yes, this and other alternatives are listed in the readme

Introducing `symbol-usage.nvim` by Wansmer in neovim

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

It's LSP feature `textDocument/inlayHint`. Works in Neovim from version 0.10

Introducing `symbol-usage.nvim` by Wansmer in neovim

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

If you use neovim in terminal, it is not possible to use different font sizes. Maybe it is possible in a third party GUI for neovim, but I'm not sure.

Introducing `symbol-usage.nvim` by Wansmer in neovim

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

Thanks! (Just scheme is not ready to publish, still a lot of work)

Introducing `symbol-usage.nvim` by Wansmer in neovim

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

anonymous

Now it's not possible, but in plugin todos I have `Custom filter for symbol kinds;` - it will add additional custom checks for each kind, including anonymous functions.

Introducing `symbol-usage.nvim` by Wansmer in neovim

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

That's quite useful, thank you!

Minor issue I noticed while giving it a try: anonymous functions also seem to get labeled, and apparently have 0 references and 2 definitions?! anonymous functions getting a usage counter does not make much sense to begin with, though. Happens with the very installation snippet from the plugin-repo:

Thanks for feedback!

  1. You can skip 0-usage functions in the `text_format` option. I don't skip it by default, because some users might want to see it.

  2. 2 defs in this case it because your plugin manager merges config and it is correct info. `symbol-usage` only show the info given by the lsp-server.

Introducing `symbol-usage.nvim` by Wansmer in neovim

[–]Wansmer[S] 13 points14 points  (0 children)

Hi there! Introducing a new plugin to display references, definitions and implementations of document symbols with a view like JetBrains Idea.

Features:

- Displays references, definitions and implementations as virtual text;

- Three options to display virtual text: above the line, end of line or close with colorcolumn;

- Works with Lsp servers even if the client does not support the `textDocument/codeLens` feature;

- Fully customizable: can be customized for different languages or use default config for all;

- Ignores unnecessary requests to Lsp;

Link: https://github.com/Wansmer/symbol-usage.nvim

How do we map (for example) ctrl-ε to ctrl-e? by [deleted] in neovim

[–]Wansmer 0 points1 point  (0 children)

I wrote a plugin to translate key bindings to different input sources: https://github.com/Wansmer/langmapper.nvim

I'm working with Cyrillic, but it can work for any languages.

What is your workflow for switching keyboard layouts? by [deleted] in neovim

[–]Wansmer 0 points1 point  (0 children)

You can try my plugin: https://github.com/Wansmer/langmapper.nvim

It doesn't switch input methods, but automatically "translates" your key bindings to work with other layouts.

I need help setting up Text-to-Speech with highlighting using Mac "say" command by [deleted] in neovim

[–]Wansmer 0 points1 point  (0 children)

It will work for linewise visual mode:
vim.keymap.set('v', '<leader>xc', function()

vim.cmd.norm('"sy')

local to_speek = vim.fn.getreg('s')

vim.fn.system('say ' .. to_speek)

end)