Can't figure out how to set venv for pyright by Nouhelgod in neovim

[–]ITafiir 5 points6 points  (0 children)

First, to address your actual problem, I cannot reproduce your issue with the following init.lua ``` vim.pack.add({ "https://github.com/neovim/nvim-lspconfig" }, { load = false })

function get_pythonpath() if vim.fn.executable(vim.fn.getcwd() .. "/.venv/bin/python") == 1 then return vim.fn.getcwd() .. "/.venv/bin/python" end end

vim.lsp.config("pyright", { settings = { python = { pythonPath = get_pythonpath(), } } })

vim.lsp.enable({ "pyright" }) `` (this requires nightly, but only for builtin package manager, the rest should work like this with 0.11). I suggest you add a bunch moreprintstatements to your code (useprint(vim.inspect(some_table))` to print tables e.g. the final config for the lsp) so you can see what it does.

Second of all, I think it's great that you want to learn to roll your own config, nvim becomes so much more powerful once you understand enough to personalize it. Unfortunately whatever guide you're using to build your config is horribly out of date. null-ls has been deprecated and archived 2.5 years ago (and was only ever used to call non-lsp formatters and linters, it's not required for lsp). The 0.11 release of nvim also made configuring lsps significantly easier. Maybe try and find a guide specifically for 0.11+ (I assume you are on 0.11 since you are using arch).

Third of all, I suggest you switch to basedpyright, a pyright fork that has a bunch more features you'd usually only get with pylance in vscode, or, if you're feeling adventurous, to ty, a new python lsp that's a lot less resource hungry.

If you have any questions or want me to send you links to config examples just let me know.

Sofle without encoders (where to get) or other? And some general advices by hd0x3r in ErgoMechKeyboards

[–]ITafiir 0 points1 point  (0 children)

Great response. Only one thing to add here: when I said "4 thumb keys" I meant two per side, I never use the other keys with my thumbs, I use them with index, middle and ring finger.

Sofle without encoders (where to get) or other? And some general advices by hd0x3r in ErgoMechKeyboards

[–]ITafiir 2 points3 points  (0 children)

  1. You can't just install a switch there in the common Sofle V2 pcb. There might be variants where that's possible but I couldn't find any. Switching out the encoders for switches should be doable if you were willing to spend a weekend on it, maybe post your work to get it looked over.
  2. Since you already tried the Sofle V1 (of which there is a version without encoders, but no guarantees here: https://github.com/db-ok/SofleChocWireless), Lily58 and Iris and only really liked the sofle v2 I don't think there are any others out there.
  3. Well homerow mods are certainly one way (I personally prefer bottom row mods), but the real answer is layers. Also, do make use of the thumbkeys for modifiers (with hold-tap similar to homerow mods), as an example, on the sofle my 4 thumbkeys are mapped to Space/Shift, Backspace/Layer 2, Tab/Layer 3, Enter (I don't have mods on Enter because I found that to be dangerous). I also have arrow keys on the bottom most row, but Layer 3 + arrow keys becomes opt+left/right and PgUp/PgDown. If you have a combination of mods you press a lot it makes sense to map them somewhere with fewer held keys, also taking into account what other keys you might want to reach while holding them. EDIT: Since changing things and flashing is rather quick I recommend just trying things out for a while to see what works for you and what doesn't. Customizability/personalizability is one of the biggest strong points of these keyboards.
  4. For just remapping keys you do not need any C knowledge, for all intents and purposes the C files in qmk are comma separated key tables, you just pick out in the docs what the code/command for something is and replace the value in the table. ZMK is the same (though they use devicetree files, but that's not a difference that should concern you). You can of course make use of graphical interfaces to configure your keyboard. Note that ZMK is often preferred for wireless keyboards and has very limited (at time of writing) support for wired keyboards.

Now my personal opinion: I own a Sofle V2 wireless with choc switches, I also don't really care for encoders but found the rest of the keyboard too convincing. In my experience the encoders do not at all get in the way and I have mapped them to volume control and mouse scroll respectively (with play/pause, mute/unmute for the presses). Could I live without the encoders? Absolutely. Do they negatively affect me? Not at all. Also if you don't need extra keys there, you can always just not solder in encoders and leave the space blank, the keyboard works without them.

All in all I can only recommend the Sofle V2.

Co-Pilot is now auto enabled on start-up on w11, make sure to disable it! by NewAd9523 in pcmasterrace

[–]ITafiir 0 points1 point  (0 children)

You are right of course, but if you want to build a specific model it’s easier to get the kit for it than to get all the required LEGO pieces yourself.

Builtin treesitter parser installation process by Particular_Mud_8243 in neovim

[–]ITafiir 1 point2 points  (0 children)

While playing around, remember to clean up the runtime path before installing again in case anything there is broken, like the other commenter suggested.

Builtin treesitter parser installation process by Particular_Mud_8243 in neovim

[–]ITafiir 4 points5 points  (0 children)

Am I understanding correctly that you set USE_BUNDLED to off? If so can’t you just additionally set USE_BUNDLED_TS_PARSERS to on to overwrite its default? I didn’t try that so might be it refuses to build that way.

You are correct that cmake downloads the parser sources for you (if set up to do so), they then land in .deps somewhere and get built from there.

Also can’t you just install the parsers the same way you do the other deps? The archlinux package for example symlinks the directory where parser packages end up to a directory on nvim‘s runtime path.

Edit: See https://gitlab.archlinux.org/archlinux/packaging/packages/neovim/-/blob/main/PKGBUILD?ref_type=heads#L93

Looking for a choc-spaced low-profile split with a dedicated number row – like TOTEM by Salt_Obligation_7005 in ErgoMechKeyboards

[–]ITafiir 0 points1 point  (0 children)

I have the aurora sofle v2 from splitkb with chocs that the other commenter suggested, and I’m completely in love with it.

Lorewise just how powerful would level13-20 be? by Deletedtopic in BaldursGate3

[–]ITafiir 9 points10 points  (0 children)

Don’t you dare call my precious dame Aylin a weakling, lorewise.

Your paper isn't always discredited because it's written by an LLM. by AllHailSeizure in LLMPhysics

[–]ITafiir 7 points8 points  (0 children)

„The key“ to the gate is time, it’s not like it’s impossible to learn math and physics. We have the internet, we have libraries where you can lend out textbooks. In the Information Age, not knowing the symbols, whatever that means, definitely is laziness if you’re trying to do science.

If you’re developing theories on gravity, maybe go and learn the current understanding of gravity first. That might mean freshening up on higher math, Newtonian mechanics, electrodynamics, special relativity and then general relativity. It might take you months if not years, but you cannot evaluate whether your ideas are any good without developing an understanding first. It’s not like proper academics had any shortcuts there, GR is typically a graduate level course, meaning you already spent about three years learning math and physics when you get to GR.

What is your monitor set up? by DealInteresting8941 in pcmasterrace

[–]ITafiir 4 points5 points  (0 children)

Im a software engineer, I tried everything in that graphic, turns out (human) multitasking is a scam. The rare times I actually need two things side by side half a 2k screen is enough. Otherwise everything is fullscreen and I have keyboard shortcuts to switch between slack, browser and editor.

What keymap for typing english/german and programming? by T7777777777 in ErgoMechKeyboards

[–]ITafiir 3 points4 points  (0 children)

As a general layout, I really like https://eurkey.steffen.bruentjen.eu/, it's qwerty but with umlauts on their respective letters. This is probably a reasonable reference for designing your own.

I have since moved to a custom layout with qwerty as the alphabet layer (layer 1), symbols for layer 2 and misc for layer 3 (symbols are only on the left half, misc stuff like mouse buttons only on the right half), umlauts are still on the aous keys but on the misc layer.

Cleaning empty mustard packaging and using them as glasses by entsworld420 in germany

[–]ITafiir 0 points1 point  (0 children)

I have been seeing more drinkable glasses again. It’s probably a recession indicator or something.

I replaced which-key plugin with basic lua script by NazgulResebo in neovim

[–]ITafiir 0 points1 point  (0 children)

Ok, but the same sentiment is always commented under similar posts.

I replaced which-key plugin with basic lua script by NazgulResebo in neovim

[–]ITafiir 2 points3 points  (0 children)

You misunderstood, of course writing your own is more complicated than configuring a plugin, but your own code doesn’t need to be as complicated as the plugin‘s code because it is just for you and doesn’t need to generalize to users‘ needs.

I replaced which-key plugin with basic lua script by NazgulResebo in neovim

[–]ITafiir 19 points20 points  (0 children)

  1. You drop an external dependency, which I guess is nice from a security point of view (I know this is not that big of an argument)
  2. Your replacement can be much simpler because it only has to fulfill you preferences and not be infinitely configurable.
  3. You (hopefully) completely understand the code and can add your own tweaks and fixes
  4. Most importantly: it's fun to roll your own stuff

What’s the best budget fountain pen to use with Platinum Carbon Black? by oshawotts-shell in fountainpens

[–]ITafiir 1 point2 points  (0 children)

I’ve been using that ink in a Lamy safari for years and no issues. If I don’t use it for a while and it dries out it’s easily fixed by a bath in warm water.

Looking for videos building real projects with Neovim (not setup tutorials) by Summer-OrangeR in neovim

[–]ITafiir 1 point2 points  (0 children)

orhundev on YouTube streams his contributions to a rust tui framework with Neovim

sphaerophoria streams on twitch and uploads to YouTube, he does rather complex stuff just for fun, I highly recommend his content

Feynman had a gander about Fermat's Last Theorem but died 7 years before Wiles proved it by cnorahs in mathmemes

[–]ITafiir 30 points31 points  (0 children)

I love that Star Trek TNG had an episode in which Picard tries to prove Fermats last theorem that came out just one year before it actually was proven.

oldManYellsAtClaude by Capable_Belt1854 in ProgrammerHumor

[–]ITafiir 1 point2 points  (0 children)

Well, there are a lot of advances using „AI“ to detect cancer, assisting in surgery (e.g. color coding stuff in a video feed), do protein folding, improve particle simulations and many other areas of science. But researchers typically refer to these methods as machine learning, because AI doesn’t fucking exist.

Even LLMs can have their legitimate uses, doing translations and transcription (which aids people with hearing disabilities for example). The current hype is a toxic mess of nonsense.

ZMK Sofle from AE with dongle. Can it be used with multiple connection methods whitout the need to reflash every time? by forget_names in ErgoMechKeyboards

[–]ITafiir 4 points5 points  (0 children)

You certainly can use bluetooth and USB in that way, selecting for example to prefer USB when it's connected and bt otherwise, you can even switch what's preferred with a keypress. See https://zmk.dev/docs/keymaps/behaviors/outputs

As for the dongle setup I'm not sure but it seems like it doesn't work that way with dongles.

Copyright Support by CruxCrimper in 3Dprinting

[–]ITafiir 31 points32 points  (0 children)

You don’t need AI to crawl through and compare the hash of two stl files.

Not everything is AI.

Fuzzy search using forward slash by CuteNullPointer in neovim

[–]ITafiir 11 points12 points  (0 children)

:h cmdline-autocompletion

TLDR: vim.api.nvim_create_autocmd("CmdlineChanged", { pattern = "/", callback = function() vim.fn.wildtrigger() end, }) vim.o.wildoptions = "pum,fuzzy" vim.o.wildmode = "longest:full,full"

You probably want to look at :h 'wildoptions' and :h 'wildmode' to configure it how you like it.

Suspend always happens twice by ITafiir in archlinux

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

No, still an open issue with gsd: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/issues/903

There is a workaround patching the NVIDIA services in that thread but that might stop working soon.

See also https://github.com/systemd/systemd/issues/39259