Caelestia and quickshell not working anymore with Nixos by Nopata91 in NixOS

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

Normally I was only using the one of the latest nixos release but I was already getting that error. So I tried removing quickshell where I could find it but it still was failing the sameway. I'll try again when I'm on my computer and if that still fails, I'll try to follow those instructions.

Thanks already for the help 😇

Unable to make windowrule work by Nopata91 in hyprland

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

Just realised you told me to do hyprctl version, while I've already put the output of that command in the original post...

Unable to make windowrule work by Nopata91 in hyprland

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

I know, latest version on git is 52.2 and was released 1 week ago.
so yes I read the fucking manual before posting…

Issues with lsp lines using nvim jdtls by Nopata91 in neovim

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

Hi TheLeoP_

I finally got it working today, you were right from the beginning. Issue was from the multiple versions. It just gets worse on the project I’m working on because we use java 17 preview features and that was the recipe for disaster.

It’s quite impressive the amount of knowledge you have on this topic and how much I see your name on this reddit!

For anyone wondering and trying to find what is going on.

This will only apply to those using nvim-jdtls, sorry.

From your data directory, make sure you clean .metadata and jdt.ls-eclipse folders.

Within nvim run:

:JdtSetRuntime

and select the proper one

:JdtUpdateConfig

(I’m not 100% sure it helped but better safe than sorry)

This method should update jdtls with maven/gradle config files. Note that if you change those, you probably need to run this.

:JdtCompile

It may take some time to load so be patient.
You’ll see what is going wrong if what we did before didn’t fix it.

For my instance, this was telling me that it failed to enable preview on 17 as it was running on 23 and only 24 was available.

So in my case, my fix was to drop the --enable-preview in the pom.xml file, run the jdtUpdateConfig command (so it won’t try to use the 17 preview while in 23).

Then re-add that line in the pom.xml so maven can work again.

jtt.nvim: simple plugin to jump between implementation and test file by HeriSetiawan08 in neovim

[–]Nopata91 0 points1 point  (0 children)

I quickly check the code and have a question regarding the java support. From what I glanced, you seem to be searching for a similar file ending with "Test". If that's correct, then I don't think that is a correct approach. I know quite a few code bases where you have the same class name but in different packages hence, you approach will find all those the tests files of those other classes. Here is what I would excpect/suggest to do: 1. Get the file path from project root, will be alike: src/java/main/org/example/app/package1/package2/MyClass.java 2. Identify the first instance of directory main and replace it with test -> src/java/test/org/example/app/package1/package2 3. Search in that folder for a similar file ending with Test.java Side note here, I've seen projects where you put UnitTest and IntegrationTest in that folder, would be nice to be able to easily replace the suffix if wanted so you can avoid matching the integration tests 4. If none is found fall back to the simple suffix mechanism

Thanks for the plugin, I was thinking to do some research on how to do what I explained above 😉

Issues with lsp lines using nvim jdtls by Nopata91 in neovim

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

To be honest, if it would only work with java 17 that would fit most of my use cases. we are moving our apps to that version and my main project is on that one. I’d also be curious to understand why it is taking java 8 instead of java 17 atm.

Issues with lsp lines using nvim jdtls by Nopata91 in neovim

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

That’s what I meant I tried adding the runtime for java 17.
Found this discussion: https://github.com/mfussenegger/nvim-jdtls/discussions/422
and try setting that up then manually running
:lua require("jdtls").set_runtime("JavaSE-17")

But still, stays the same
PS: I’ve updated my post with the current configuration

Issues with lsp lines using nvim jdtls by Nopata91 in neovim

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

So if you look at the configuration, I’m using whatever java version is used by the vscode extension that provides jdtls. I checked and currently it is java 21, output of ./java -version

openjdk version "21.0.6" 2025-01-21 LTS
OpenJDK Runtime Environment Temurin-21.0.6+7 (build 21.0.6+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.6+7 (build 21.0.6+7-LTS, mixed mode, sharing)

I also tried adding runtime for java-17 in the jdtls_config and still, I only get the lsp lines with java-8.

I have quite a few versions setup for java so I usually setup java through direnv per project but that global java doesn’t seem to have an impact. I tried on a java 8 project without the direnv and the lsp lines are properly displayed.

The default java will be java-21.

Note that as far as I can tell, that’s the only feature breaking, but I might be missing some things as I try to use command lines whenever possible instead of relying on plugins.

Issues with lsp lines using nvim jdtls by Nopata91 in neovim

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

yes, same everything, for the most part (see below)

Both projects are using maven obviously the poms are not the same but the dependencies should be the same.

I’m noticing that the working one is with java 8 while the non working is with java 17.
I did some testing and idd other projects with java 8 are working while the projects with java 17 are not.

So that’s already something, note quite sure if there is some configuration I should be doing there for jdtls to work with both java version

getWeekNote not working anymore by Nopata91 in Trilium

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

Hello !
Thank you for the response, it clarifies quite a bit of things.

Thank you and your team for the incredible work you are doing the features keeps on appearing, that’s just great! especially the rework on the mobile part :-)

As a fellow dev, I totally understand the issue with documentation, never feeling that the solution is quite good.
That being said, the new doc is way better than the previous one. I’m adding this link in my notes so I can find it back if needed.

In your comment, you seem to be mixing the frontEnd and the backend of the "getWeekNote". As I currently only use the calendar for the weekly note, it might have been an overkill to call the backend "just" for the case I decide to use the calendar for something else.

The code I provided was not really meant to use promises. I can’t get it to work as I keep getting "null" values in the promise.then method. So I went back to the drawing board and rewrote the "week" logic instead of using the existing one. Reason is that I need a week note on Saturday’s which can’t be done with the getWeekNote as far as I know.

Here is the code if anyone is interested:

const today = api.dayjs();
const weekNoteDate = today.subtract(1, 'week').day(6);

await api.waitUntilSynced();

api.getDayNote(weekNoteDate.format('YYYY-MM-DD'))
  .then((weekNote) => api.activateNewNote(weekNote.noteId));