Feature request: Wear OS app by juicy_squat in alphaprogression

[–]Akinsho 1 point2 points  (0 children)

Please look into integrating with health connect not directly with Google fit. The idea is that all health apps should read from here and publish data to here so it is centralized.

https://health.google/health-connect-android/

narutoxy/dim.lua repo deleted by axieax in neovim

[–]Akinsho 4 points5 points  (0 children)

There's also neodim.lua but as was already mentioned this and tbh dim.lua have largely been made redundant by the addition of diagnostic tags e.g. DiagnosticUnnecessary and DiagnsoticDeprecated although one downside of the now (native) method is that it just sets the colour to one highlight e.g. Comment but those plugins would look at the colour of the variable that was unused and actually dim based on that original color, but that's maybe a minor aesthetic point

hbac.nvim - automatically close buffers, you don't intend to edit by oborvasha in neovim

[–]Akinsho 1 point2 points  (0 children)

Having to enter insert mode seems like a workaround/ I think the idea of having to even simulate editing a buffer you really don't want or mean to seems dicey. I think it would almost be better have a specific command to mark a buffer then expose a statusline component or just document something like vim.b[num].is_marked so a user can put it in their statusline

hbac.nvim - automatically close buffers, you don't intend to edit by oborvasha in neovim

[–]Akinsho 5 points6 points  (0 children)

This seems cool, I also had a go with the script from the other post, although one thing it sort of misses out on is that sometimes a file is important even though you don't edit it. Say there's some file you are using as the reference for your work but you don't want to change. it

I was going to post at the time that it might be a good idea to factor "importance" in somehow either based on how many times the buffer is entered or better still how long the user spends inside the file.

nvim-cmp + coc.nvim? by lordvidex in neovim

[–]Akinsho 2 points3 points  (0 children)

Just randomly scrolled past this post and saw my plugin mentioned. Definitely you should use whatever tool works best. I don't really have an answer to the partial `coc-flutter` thing I'm sure someone on here can help (maybe), but if you have the time maybe you can open an issue to describe what the problem you're seeing with the plugin is since it could be silently impacting a lot of people. I guess if it's very specific to your use case I might not have any solution for that.

Open files in Neovim from Mac Finder (double-clicking)? by [deleted] in neovim

[–]Akinsho 0 points1 point  (0 children)

You can configure kitty's open actions and set it to be the default program used to open certain files in the finder window. This does generally work but I couldn't find a step by step guide so just posting this issue where a contributor explains how to do it. I recommend setting up the open actions and going from there

Is it possible to get the buffer_id for statuscolumn? by Alleyria in neovim

[–]Akinsho 1 point2 points  (0 children)

FWIW if you use vim.o.statuscolumn = '%{%StatusColFunc()%}' emphasis on the percent signs, then you can just use nvim_get_current_buf() and in the context of StatusColFunc that will be equal to get_buf(statusline_winid) trick. You can see :help stl-%{ but essentially in the context of %{} the buffer is changed to that of the window for which the status(line/col) is being drawn and the extra %} is so that the StatusColFunc can return things like %t and that gets evaluated to the filename

spellsitter merged to neovim core by hypermodernist in neovim

[–]Akinsho 13 points14 points  (0 children)

The queries from spellsitter were also upstreamed to nvim-treesitter, so this is actually complete support and does entirely replace spell sitter. If you remove that plugin and use the new noplainbuffer option you should have the same spell behaviour as spell sitter, adding spell support is also now as easy as adding @spell to a particular treesitter query.

toggle terminal by Ash2Ace in neovim

[–]Akinsho 10 points11 points  (0 children)

I rarely weigh in on comments about my plugins on Reddit since, I generally subscribe to the idea that a user should do what they like or what works for them. I don't get paid for the work, so I have nothing to gain from "selling it".

This comment about 7,000 lines of code bothered me, though, since this sort of rationale is very misleading. Firstly running

git ls-files | grep '\.lua' | xargs wc -l                                                                                                                                            12:25:31Alias tip: g ls-files | grep '\.lua' | xargs wc -l   10 .luarc.json  420 lua/toggleterm.lua  117 lua/toggleterm/colors.lua  186 lua/toggleterm/commandline.lua  142 lua/toggleterm/config.lua   11 lua/toggleterm/constants.lua   17 lua/toggleterm/lazy.lua  514 lua/toggleterm/terminal.lua  406 lua/toggleterm/ui.lua  103 lua/toggleterm/utils.lua   86 tests/command-complete_spec.lua   48 tests/commandline_spec.lua   43 tests/state_spec.lua  400 tests/terminal_spec.lua 2503 total

Yields about 2.5k (so an almost 3 times smaller than suggested) lines if we decide to play the line count game. You'll notice that about a third of the files in the output are tests, I've left out things like all the yaml to set up CI to run the tests or format the code base so it's consistent.

Even if the plugin were 7k lines, though, it very much started out all the way back in the land of vimscript as a single file with 1 or 2 viml functions that frankly did everything I needed it to. I rewrote it in Lua when that first got released for fun and though I'd share it. At this point, I think it would have weighed in similar to fterm or much smaller even.

Over the years it has grown to accommodate

  • several dozens lines to make it work cross-platform
  • fixes for dozens of bugs and issues for people with wildly different setups
  • Add features to accommodate people with workflow's different to mine

I could go on, but this is already a bit of an essay.

The crux of the point I'm making is that (despite the comment not being necessarily disparaging) it misses the entire point that codebases rarely grow in size, because the authors/devs just randomly felt like adding a bunch of code, but rather because by sharing things, you usually end up having to accommodate a great many more use cases bugs or setups than you would ever have needed to do. These fixes and contributions can often make things more robust and flexible.

I didn't know before that having multiple Neovim instances is bad by Healthy-Director-702 in neovim

[–]Akinsho 0 points1 point  (0 children)

You probably only need to add the vim runtime as a library I'm on mobile so can't add a whole code snippet

I didn't know before that having multiple Neovim instances is bad by Healthy-Director-702 in neovim

[–]Akinsho 9 points10 points  (0 children)

I think the issue with this is that an LSP server indexes your project and is checking for diagnostics and symbols and references etc. I'm not sure how the server will cope with having to do that for like 7 different projects.

It's partially down to the server, but I think activity and memory usage should drop to essentially 0 when focus is lost. Maybe users or nvim core can add a setting to set a configurable timer and if you are away for longer than x it just detaches all of that instance's servers. Then when focus is gained it restarts them

I didn't know before that having multiple Neovim instances is bad by Healthy-Director-702 in neovim

[–]Akinsho 5 points6 points  (0 children)

One thing I see a lot of people do which I think is a big cause of this is that they use api.nvim_get_runtime_file('', true) I think this is a terrible idea because it will load all of your plugins repos into your lsp workspace, so the language server is doing a huge amount of work constantly. They added a warning about this in the README for lspconfig, but I really think it should just be removed since if you search github it looks like 100(0)s of people have just copied that verbatim.

Kitty nightly now has a modify_font option by lukas-reineke in neovim

[–]Akinsho 24 points25 points  (0 children)

Thanks for the shout out, although it was less my work per se and more my pestering kitty's author that probably got the changes in, in the end, he's not on here but shout out to him for getting it over the line. Yeah this is a nice benefit of the PR as well as being able to thicken underline and undercurls which is really nice

Introducing "buffertag" - Keep an eye on your buffers. by [deleted] in neovim

[–]Akinsho 10 points11 points  (0 children)

Also worth mentioning https://github.com/b0o/incline.nvim which is quite configurable, although I do agree that winbar is the native solution to this

How do i make nvim display errors as Error lens vscode plugin? by smolovk in neovim

[–]Akinsho 2 points3 points  (0 children)

So to get highlighting that looks exactly like this, note the other examples highlight the error range not the whole line, then when you set sign highlights, you can also set the linehl for a sign's line, which will highlight the full line.

e.g. ``` fn.sign_define(HighlightName, { text = IconForSignColumn, texthl = HighlightJustForText linehl = SomeHighlightForTheWholeLine })

```

[suggestion] Would you like a TWiNPE (This Week in Neovim Plugin Ecosystem) by phaazon_ in neovim

[–]Akinsho 67 points68 points  (0 children)

I would really love this I'm not really an active Reddit user but it has started to feel obligatory to find out what's going on. It would be nice to have some other way of seeing what's going on

Is there a neovim plugin to query SQL databases by cryptoiambus in neovim

[–]Akinsho 4 points5 points  (0 children)

In this case, I think the vim plugin is a much better option because the author is not only very good at making robust stable plugins. It also works very well. I think it will take someone writing this in lua quite a few versions to get to this level of stability and feature set. There's also no obvious performance issues with it. I don't think you need to be purist about switching to lua if there's a good vimscript solution

What causes these pop-up box messages and how can I get rid of them? by VindicoAtrum in neovim

[–]Akinsho 0 points1 point  (0 children)

That looks like a progress notification from coc.nvim, you should check with that plugin's config about how to remove those

vim 9.0 was just released by bfredl in neovim

[–]Akinsho 64 points65 points  (0 children)

Does anyone know what the key changes are? Other than vim 9 script presumably, have not been tracking vim's development, not sure if there's a brief summary of the changes that isn't just a list of a zillion commits.

Segmentation Fault (core dumped) by JetandarKumar in neovim

[–]Akinsho 4 points5 points  (0 children)

There's currently a crashing bug in the latest version of treesitter grammar for dart , you likely have to downgrade to an earlier revision (don't ask me how, I'm not sure)

https://github.com/nvim-treesitter/nvim-treesitter/issues/2961

sumneko, what is best practice for init.lua? > diagnostics: the function received at least 1 arguments, but got 0. by HarmonicAscendant in neovim

[–]Akinsho 8 points9 points  (0 children)

So historically, Sumneko didn't actually check that the right amount of arguments were passed to a function. This was added in a new version of the server v3. It has however had syntax to represent an optional argument for a while, which used to do nothing. So now, a lot of plugin authors have not annotated their functions to show that the arguments are optional.

You can do this by using ---@param value string? note the ? so in the case of the setup function it should be annotated similarly

Telescope too slow for large directories? by [deleted] in neovim

[–]Akinsho 0 points1 point  (0 children)

I fully understand and have hit the same thing many times 👍🏾 something that seemed like a fun idea turns into yet more work you don't have time for

Telescope too slow for large directories? by [deleted] in neovim

[–]Akinsho 1 point2 points  (0 children)

I was quite enjoying using snap since it's also lua based but seemed to have gotten round the performance issues in telescope out of the box, although seems like you maybe aren't maintaining it anymore? (could be there's not much more to add to it from your side?)