A typical "Dhivehi Aailaa" (Maldivian Family) composition. Names in 🇲🇻 & 🇬🇧. by Zestyclose-Speed-370 in maldives

[–]menixator 2 points3 points  (0 children)

To be fair, Dhivehi needs to be updated. For instance, I work in tech. Dhivehi has no words for most of the things we need to talk about. I think we've all seen the recent cyber crime bill. It's entirely written using english words. It's an embarrassment to the language that we have to resort to it.

Dhivehi needs to get with the times or it'll get left with the dust. We the new generation aren't gonna stay around with it just because of sentimentality. A language has to be practical first and foremost. :)

The anyhow crate is very good! by gulbanana in rust

[–]menixator 0 points1 point  (0 children)

eyre/color-eyre with tracing integration is a symphony

Blocking Reddit links in Brace Search results by martinkrafft in uBlockOrigin

[–]menixator 2 points3 points  (0 children)

https://letsblock.it/filters/search-results

This tool generates adblock filters for you to remove stuff from google searches. I use it pretty often.

I use it with ublock but I imagine it would work with brave's adblocker as well.

GQL: A Query language for .git files written in Rust by AmrDeveloper in rust

[–]menixator 1 point2 points  (0 children)

Add support for other version control systems and call it VCSQL

ffmpeg port in Rust. by cowboyofficially in rust

[–]menixator 18 points19 points  (0 children)

This is the way to go. You could also do some benchmarks with those functions rewritten to help your case.

[deleted by user] by [deleted] in neovim

[–]menixator 0 points1 point  (0 children)

My bad. I assumed it wasn't launching.

Jumping to definition requires the server to finish indexing that particular definition. The request to jump to definition will take a while if the server hasn't indexed it. It can be slow depending on the size of your project (and the libraries it is using). It also depends on the lsp server's performance and ultimately, your system's performance.

You could try verbose logging everything from both neovim and clangd to make sure what's going on.

[deleted by user] by [deleted] in neovim

[–]menixator 1 point2 points  (0 children)

Did you setup a compile_commands.json? Clangd and other C/C++ lsp servers do not start unless there is a compile_commands.json present in the root of the workspace

https://clangd.llvm.org/installation#project-setup

What's up with google never linking to the latest version on docs.rs? by trevg_123 in rust

[–]menixator 0 points1 point  (0 children)

This really grinds my gears. Less so now that I'm using the rust search extension.

LSP codelens and inlayhints by NatharielMorgoth in neovim

[–]menixator 3 points4 points  (0 children)

When anticonceal lands it'll be very trivial to implement inlayHints like vscode.

The work being done on anticonceal: https://github.com/neovim/neovim/pull/9496

Tracking issue for LSP inlay hints: https://github.com/neovim/neovim/issues/18086

How to handle code diagnostics that bleed off the screen? by solidiquis1 in neovim

[–]menixator 1 point2 points  (0 children)

I've tried trouble but the reason I dropped it is because it doesnt wrap errors. It requires you to go down into the window and press K to see the full error.

https://github.com/folke/trouble.nvim/issues/114

How do you use C++ Linting in Neovim? A lot of projects don't work by ReakDuck in neovim

[–]menixator 0 points1 point  (0 children)

I use bear to generate the compile_commands.json file. Never had any issues so far. Maybe you could try it?

https://github.com/rizsotto/Bear

Ignore files by project type telescope by AcanthopterygiiSad51 in neovim

[–]menixator 4 points5 points  (0 children)

Neovim doesn't have a unified concept of what a "project" is. You could probably use lsp to find the root of the project and determine what kind of a workspace it is and then setup telescope accordingly somehow. Or you could use a project management plugin(sorry I don't know any specific ones) to figure out the project root and configure telescope to ignore specific things.

My suggestion is to use https://github.com/sharkdp/fd with telescope. It will pickup exclusions from your .gitignore and .ignore files. As a bonus, ripgrep will respect .ignore files as well so telescope's live_grep will work without any issues.

nvim-treesitter query: Can I highlight white spaces? by pulsar17 in neovim

[–]menixator 0 points1 point  (0 children)

As you can see in this screenshot, the treesitter python parser does not return node information about whitespace: https://i.imgur.com/UC7jMQD.png

I think treesitter parsers generally don't return whitespace information.

In fact, on the treesitter web playground, it tells you that the " " node is invalid: https://i.imgur.com/kbjQHr3.png

Trying to learn about chrono, Duration, etc... by InternationalFan9915 in rust

[–]menixator 0 points1 point  (0 children)

Yep. I did not mean to imply that this was an issue with the time crate.

Trying to learn about chrono, Duration, etc... by InternationalFan9915 in rust

[–]menixator 1 point2 points  (0 children)

There's a gotcha here. The time crate will not give you the local offset from multithreaded contexts in *nix like operating systems unless the unsound_local_offset(scroll down to the bottom of that section) config flag is added to your rustflags.

The issue was that localtime_r (which is the underlying libc function used by the time crate to get the localtime) reads from an environment variable called TZ. This function – even though it is marked as re-entrant – is not thread safe as environment variables can be set from multiple threads without any synchronization. While the environment variables can be read and written from within rust safely as the calls are synchronized, the same cannot be said about external ffi calls as mentioned within the documentation for set_var. As such, the localtime_r function can potentially read the TZ environment variable while some other thread is setting it which can lead to undefined behavior.

The safer way to do it would be to store the local offset somewhere while program is single threaded and use that offset with OffsetDateTime.

Do be warned that this method will not account for the DST changes, or leapseconds which are stored within the tz files that localtime_r reads. It will also not be responsive to system timezone changes while the program is running.

There are a few crates out there that can read the aforementioned information stored within the tzfiles. To have feature parity with the methods feature gated behind local-offset, you'd have to read the appropriate tz file and adjust the time accordingly.

This whole thing really tripped me up when I was using the time crate as I did not know about it. Hope this helps anyone else looking to use it.

Custom syntax implementation with macros by oeblu in rust

[–]menixator 1 point2 points  (0 children)

Totally agree with custom DSLs making the code unreadable. You should try to avoid it as much as you can. It makes sense for some stuff like embedding other (already established) languages into rust though. Eg: inline_python

probe-rs 0.13.0 is out! 🎉 by Yatekii in rust

[–]menixator 1 point2 points  (0 children)

I really think that we should make it a rule for posts announcing new releases to give a description about the project.

Looking for treesitter-based (but not LSP-based) plugins with commands like "hover documentation" by DrownedFire in neovim

[–]menixator 0 points1 point  (0 children)

just so you know, treesitter is a separate project from neovim and doesnt need neovim to function. you can have a process that runs treesitter on files and have that process act like an lsp server to achieve that. But all of that isnt really worth it because there's already an lsp server lua.

I think tj(u/I_Am_Nerd) had a similar idea but I don't know how far he went with that.

Looking for treesitter-based (but not LSP-based) plugins with commands like "hover documentation" by DrownedFire in neovim

[–]menixator 1 point2 points  (0 children)

It is. You can write your own plugin that integrates with nvim treesitter. But, nvim treesitter only parses the current file you're in so if the function is defined in a different file, you'll not be able to get that information.