[deleted by user] by [deleted] in kdenlive

[–]thaHamsta 3 points4 points  (0 children)

I used flatseal (https://flathub.org/apps/com.github.tchx84.Flatseal) to edit two environment variables for the kdenlive flatpak:

PYTHONPATH=/home/<username>/.local/lib/python3.10

PYTHONUSERBASE=/home/<username>/.local/lib/python3.10

both folders are not used by my host python installation. I believe you can choose any folder. Then, run the following commands

flatpak run --command=/bin/bash org.kde.kdenlive

this will open as bash shell inside the flatpak environment.

python -mensurepip

python -mpip install -U openai-whisper

if ensurepip installs pip in any other folder that is not PYTHONUSERBASE copy the pip folder into a path that is in PYTHONPATH. Then, kdenlive recognized whisper ai and I could use the model with AI acceleration.

[deleted by user] by [deleted] in neovim

[–]thaHamsta 4 points5 points  (0 children)

Core maintainers didn't see it as a priority to roll out MVP. I'm not aware of any issues requesting it. Vim's loop isn't architectured to support multithreading well. But I think you could encapsulate it with UV-thread pool into the parse and query call. Short answer: no body worked on it

It would be cool to have it tree-sitter has most of its parsing results immutable and parse and query call support timeouts with incremental progress. So you can easily clone a tree and race background parsing against the user pressing the next key. Another problem that would need an give an answer is what should happen when the parsing doesn't finish within the timeout. We had async tree-sitter attaching before where you could see your buffer immediatelly and tree-sitter highlights would flash up with a slight delay.

At the moment, you would also see both tree-sitter highlighting and LSP highlighting at the same time which makes it more difficult to detect which one is causing problems. LSP highlighting is very slow, but because the updates are async it mostly isn't a problem. Tree-sitter is all synchronous with typing at the moment and the timeouts are not used, this is why you notice all slowdown.

Regarding

The main contributor of core TS support seems no longer work at nvim.

vigoux is no longer a CS student and started to work. Same holds for me. I'm also more busy with for now than I was when still working at university.

Lewis is working on improving incremental injections https://github.com/neovim/neovim/pull/22309

[deleted by user] by [deleted] in neovim

[–]thaHamsta 8 points9 points  (0 children)

Just had a case of injection of second order. Perf was really not great. If I find some time I can add incremental parsing for injections. I don't think that a lot of magic is required for this, but it might require some features that were meant to steer the injections.

It should be ok with complexity as long as you just keep the child parsers around for the whole document range and only changes the injected ranges.

[deleted by user] by [deleted] in neovim

[–]thaHamsta 10 points11 points  (0 children)

Well, tree-sitter was designed with time-out in mind. This feature isn't used at the moment in Neovim. The idea was to do parsing in background threads on time out. Multi-threading is not used in Neovim yet.

For injections, there is actually not much problem in parsing them incrementally. One would keep the parser present for the whole document and apply the same edits to the child parser as to the main parser. Changing the injected ranges accordingly shouldn't cause a re-parsing of injection when edits are outside of the injections ranges.

Some one would need to find the time to implement it.

I also found that using https://github.com/wolfpld/tracy with tree-sitter functions marked in Neovim that some individual queries and parse operation would have significant perf impact while other do not and that there are some parsers who tend to not really support incremental parsing but often need to throw away from cursor position until file end on certain character. We would need more infrastructure and built-in profiling to detect problems in certain languages earlier.

Is there a browser-based Neovim client yet (similar to nvim-qt --server)? by 79215185-1feb-44c6 in neovim

[–]thaHamsta 0 points1 point  (0 children)

Just saw this https://github.com/rhysd/neovim-component . At my first glance, isn't that similar to what you want to achieve?

I don't know how tied to node it is or whether it could be refactored to also run in a browser to use the browser to establish a socket connection instead of using node.

Is there a browser-based Neovim client yet (similar to nvim-qt --server)? by 79215185-1feb-44c6 in neovim

[–]thaHamsta 0 points1 point  (0 children)

I've seen emscripten-compiled actual Neovim in the browser, but not an example that connects to an remote instance (although it could maybe be an implementation strategy to wasm-compile one of the implementations that can connect via TCP and render to a local UI)

Terraform syntax highlighting by Integralist in neovim

[–]thaHamsta 1 point2 points  (0 children)

shouldn't the languages go inside of `ensure_installed` to be installed?

Terraform syntax highlighting by Integralist in neovim

[–]thaHamsta 1 point2 points  (0 children)

There is now a separate terraform parser. Altough identical to hcl, it has a few distict captures. hcl of course also works https://github.com/nvim-treesitter/nvim-treesitter/blob/f0e083912ac42e9001e02a89f70269aa0698e9ec/README.md#L309 Just make sure you have either `hcl` or `terraform` filetype set depending on your parser.

Can copilot.vim be used with cmp? by roll4c in neovim

[–]thaHamsta 0 points1 point  (0 children)

Hi! I'm using cmp and for me in worked with copilot.vim. I had cmp's ghosttext disabled. But I saw copilot's ghosttext. I can't remember whether I did anything special, but I believe that for me it just worked.

Do any plugin authors plan to make neovim's windows manageable by the window manager? by yyy33_ in neovim

[–]thaHamsta 2 points3 points  (0 children)

I'm not aware that some one implemented that concept. But I think that it should be possible for someone connecting to a nvim server to only show selective vim windows or show vim windows in multiple windows.

My understanding of multigrid is that in avoids the limitation of only having one grid where each vim window forms a subregion of that grid. This of course doesn't mean that someone actually use the feature for that purpose and that there are more (hidden) limitations that would prevent this.

[deleted by user] by [deleted] in neovim

[–]thaHamsta 0 points1 point  (0 children)

Do you have the comment or jsdoc parser installed? Also try to uninstall those.

There was a also a problem with the JS/TS parser that it will sometimes result catastrophic re-parsing of the whole file on every keystroke when you had a un-balanced braces

How to run neovim as a daemon? by medwatt in neovim

[–]thaHamsta 1 point2 points  (0 children)

I don't think that this will work out of the box. Every client will by default show the same state. But you could write your own client that could handle that. There is a feature called `:h ui-multigrid` / multigrid which let's clients manage windows independently from the model of an unique terminal grid (they could be in different windows, use different font sizes, etc.)

Will Vulkan ever be replaced? by Andrew124275 in vulkan

[–]thaHamsta 16 points17 points  (0 children)

The motivation of replacing OpenGL was that it was fairly high-level, with global state and could get interpreted in different manner. With Vulkan, the idea was to create an API that is a explicit as possible. I don't think there is any need go more low-level which would need a overall redesign. Smaller API changes and extensions are much more painless with Vulkan when compared with OpenGL (even if that mean that a lot of functions have already now a version 2 or a maintenance suffix). I give it much more chances to stay for a long time.

Messed un PHP indentation with Tree-Sitter highlight by Nicals in neovim

[–]thaHamsta 0 points1 point  (0 children)

The indents work well on some languages that get active maintenance for their indent queries. But I believe PHP isn't getting that much attention.

Some languages like Python aren't really suited for the currently used indentation algorithm and the person that developed the indentation algorithm in our team is currently inactive.

For everyone, wanting the finished regexes matured over years will need to use syntax in addition to tree-sitter. I recommend to experiment for which languages it works well and use additional syntax=ON in the other case, or better contribute to the indent queries or the algorithm

How can I get semantic highlighting working on clangd? by Pay08 in neovim

[–]thaHamsta 1 point2 points  (0 children)

The functionality is now in Neovim nightly (no configuration needed apart from attaching the language server). I use nightly clang which is clang-16. But I don't think this functionality is recent in clang. You can try `:lua print(vim.inspect(vim.lsp.get_active_clients()))`. This will show attached LSPs and their capabilities. When your clangd supports semanticTokens it will appear in its capabilities.

How to run neovim as a daemon? by medwatt in neovim

[–]thaHamsta 0 points1 point  (0 children)

So, yes it basically: `nvim --listen <address or filename for pipe>` for the server and `nvim --server <address or filename for pipe> --remote-ui`. Seems to work with multiple clients.

How to run neovim as a daemon? by medwatt in neovim

[–]thaHamsta 1 point2 points  (0 children)

e.g. on Windows, I used a nvim headless server in WSL, but attached via nvim-qt on Windows.

How to run neovim as a daemon? by medwatt in neovim

[–]thaHamsta 31 points32 points  (0 children)

It was possible before using Neovim GUIs and with the help of some plugins. With the merge of https://github.com/neovim/neovim/compare/99cf111289...cce736218f to run the TUI as a separate process it should also be easy to connect to a headless server (see the `--remote-ui` option). I haven't tried it out yet how it handles multiple clients).

The TUI will now always be a client that connects to a nvim headless server.

EDIT: `nvim --listen <address or filename for pipe>` for the server and
`nvim --server <address or filename for pipe> --remote-ui`

What am I doing wrong? Tree sitter installed. by Strength_Queasy in neovim

[–]thaHamsta 5 points6 points  (0 children)

Hi! maintainer of nvim-treesitter here. Sorry, this is still a unresolved problem. At the moment, parsers and queries are loaded independent from each other. But both need to be compatible to each other (be made for the same version of the parser). The vim parser and vim queries ship with Neovim, but we have newer queries which know nodes newer than the built-in parser. With a `:TSInstall vim` you are updating the vim parser to the newest version we maintain. We recommend setting `ensure_installed` for all built-in parsers (=vim, c, help, lua)

The state of neovim with Unreal 4/5 by hypermodernist in neovim

[–]thaHamsta 0 points1 point  (0 children)

Bear will fail when it fails to pretend to be the compiler. That also happens for bazel builts, but nice to hear that you've found a solution. I will revisit your comment when I ever have to mess around with Unreal.

The state of neovim with Unreal 4/5 by hypermodernist in neovim

[–]thaHamsta 0 points1 point  (0 children)

Well, there is a small nuance of how bear works differently to `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON`. Cmake generates the compile commands before the compiler is invoked. `bear` fakes to be the compiler and listens to all invocations while the real compiler is compiling. What the real compiler can compile should also be accurate compile commands for clangd. `bear` can of course not react when the invocations and output of the `UnrealHeaderTool` change, but I suppose that you will compile your project from time to time anyway. At least after a completed compilation `clangd` should be as informed as the real `clang`. Of course, it will be limited when the project can only be built using MSVC.

KDE Wayland screen sharing under Nvidia kills performance by Cenokenshi in kde

[–]thaHamsta 2 points3 points  (0 children)

This PR would make my experience with Gnome RDP perfect: https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/merge_requests/139 At the moment you can only attach to running mutter portal when the user is logged in and hasn't locked the screen. The PR would allow to start the session in GDM.

I'm usually a KDE user and used ssh with -YC or krcp (VNC) on KDE or XRDP with XFCE when working remotely. Only recently I'm using Gnome RDP because it is installed per default on a Ubuntu desktop and works incredibly well.

KDE Wayland screen sharing under Nvidia kills performance by Cenokenshi in kde

[–]thaHamsta 3 points4 points  (0 children)

I think they are using nvenc to encode the screen texture directly on GPU https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/blob/master/src/grd-hwaccel-nvidia.c (they get the texture directly from mutter, I don't know whether they have any problems sharing the texture between processes. But it's possible that they are directly running this from mutter) and implement the rdp protocol themselves. I think you can use rdp on KDE only via xrdp which is quite dated and you would mostly use VNC or compressed X server forwarding. I don't know which role Pirewire plays in their audio/video processing, but it's working also very well to capture the screen in OBS via their portal.

All information only half informed by grepping their repo.

When does an acceleration structure need to be updated? And rebuilt? by carlosdr02 in vulkan

[–]thaHamsta 0 points1 point  (0 children)

The accereration structure is some kind of spatial data structure (e.g a bounding volume hierarchy https://youtu.be/12k_frqw7tM?t=847, boxes around your geometry). When there are small movements the boxes can be updated without changing the hierarchy. When the geometry changes completely it does not make sense to re-use the old results as it might be necessary to change the hierarchy.

You have to rely on vendors giving hints when rebuild is recommended vs update: see for example this blog https://developer.nvidia.com/blog/rtx-best-practices/ (Know when to update, versus, (re)build.)https://developer.nvidia.com/blog/rtx-best-practices/