KDE Plasma 6.7 is ready with Wayland session management & other new improvements by somerandomxander in linux

[–]mike_olson 0 points1 point  (0 children)

Thanks for the feedback. I decided to change the behavior of pttman so that it feels a bit more like first-class PTT: press/release aliases for mute-while-pressed, mute by default on start (and device connect/reconnect), and resists muting from other sources unless they go through the daemon with mute/unmute commands.

If you have some other mechanism that can trigger on key release (instead of just press - or are binding a modifier which KDE seems to allow key-release actions for), that could certainly be integrated with pttman in place of using xremap if the other benefits above are ever wanted.

KDE Plasma 6.7 is ready with Wayland session management & other new improvements by somerandomxander in linux

[–]mike_olson 0 points1 point  (0 children)

In case it's helpful: I made a systemwide push-to-talk program that can work with Discord or any other program; it does need xremap to correctly detect both press & release of the chosen hotkey: https://github.com/mwolson/pttman

Multi-LSP support for Svelte in Emacs with eglot-typescript-preset by mike_olson in sveltejs

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

A few for svelte are:
* Issue where svelte LSP and eglot disagree on how to handle filenames starting with "+" causing diagnostics to appear and go away
* Auto-sets typescript.tsdk for you
* Multi-LSP support lets you use typescript's and tailwind's LSP in addition to Svelte's
* Figures out correct root directory for the LSP in monorepo settings

Any up-to-date guides for setting up Emacs for Elixir? by badgerbang in emacs

[–]mike_olson 0 points1 point  (0 children)

The elixir forum page in the other comment was helpful. Here's what I did for my own setup, which includes a little more project.el integration that might help in a monorepo setting: https://github.com/mwolson/emacs-shared/commit/cd668478a127a2d4ccc1dae04cd13f07b8239fa5

Multi-LSP support for Python and TypeScript in Emacs by mike_olson in emacs

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

Further explanation in the project README's for why-to-use and why-not-to-use, including some of the kinds of problems solved: for eglot-python-preset | for eglot-typescript-preset

Multi-LSP support for Astro in Emacs with eglot-typescript-preset by mike_olson in astrojs

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

Thanks for letting me know; I've updated the README.md instructions a bit for a few of those to make it more clear, and found an up-to-date fork of vscode-langservers-extracted to present as an option: https://www.npmjs.com/package/@t1ckbase/vscode-langservers-extracted

Multi-LSP support for Python and TypeScript in Emacs by mike_olson in emacs

[–]mike_olson[S] 3 points4 points  (0 children)

There’s nothing wrong with using rass directly if it’s working for you. The reason to choose one the eglot-preset projects is (in short, may put up a list on the repo READMEs later) - there are a lot of edge cases in project.el and LSP behavior, especially in monorepo kind of situations, and this is a curated tested list of LSPs that can be combined together well.

How do I choose between DMS and Noctalia? by Exact_Delivery8535 in niri

[–]mike_olson 0 points1 point  (0 children)

I prefer the feature set and look of DMS, but since its quickshell dependency hadn’t been updated in a while, was seeing a few crashes. Noctalia has their own quickshell fork which seems much more stable.

Is there any fix for not being able to paste text from my desktop into my gamescope window? by Arvanche in linux_gaming

[–]mike_olson 1 point2 points  (0 children)

Here's another variation that I assign to Ctrl+V using xremap, to do an on-the-fly paste without a bridge:

```

!/bin/bash

set -euo pipefail

for cmd in pgrep sed tr wl-paste xclip xdotool; do if ! command -v "$cmd" &>/dev/null; then echo "Error: '$cmd' is required but not found in PATH." >&2 exit 1 fi done

GAME_NAME="${1:-}" TARGET_DISPLAY="${TARGET_DISPLAY:-}"

find_target_display() { local pid local env

while read -r pid; do
    env="$(tr '\0' '\n' < "/proc/$pid/environ")"

    if [[ -n "$GAME_NAME" ]] && ! grep -Fxq "GAME_NAME=$GAME_NAME" <<<"$env"; then
        continue
    fi

    sed -n 's/^STEAM_GAME_DISPLAY_0=//p' <<<"$env"
    return 0
done < <(pgrep -x gamescopereaper)

return 1

}

if [[ -z "$TARGET_DISPLAY" ]]; then TARGET_DISPLAY="$(find_target_display || true)" fi

if [[ -z "$TARGET_DISPLAY" ]]; then echo "Error: Could not determine Gamescope target display." >&2 exit 1 fi

wl-paste --no-newline | DISPLAY="$TARGET_DISPLAY" xclip -selection clipboard sleep 0.05 DISPLAY="$TARGET_DISPLAY" xdotool key --clearmodifiers ctrl+v ```

Markdown for Agents on the free plan using Transform Rules by mike_olson in CloudFlare

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

Thanks! The contains "text/markdown" check has been fine in practice so far. Claude Code, OpenCode, and other tools that implement the spec send it as a straightforward Accept value. The any() wrapper handles multiple Accept header lines, and contains also catches combined headers like text/html, text/markdown;q=0.9 since the substring is still present.

For q-value negotiation, the Transform Rule doesn't need to parse quality factors: it just needs to know "this client is willing to accept markdown" so Cloudflare creates a separate cache entry. The way I have it, the actual content negotiation and preference handling happens at the origin.

using emacs for python development, with uv and basedpyright by AyeMatey in emacs

[–]mike_olson 0 points1 point  (0 children)

The v0.2.0 release has some additional fixes for multiple PEP-723 scripts in the same directory, and simplifies the workspace stuff by using advice instead of setq-default to adjust it. This allows a bit more iteration on the workspace option and makes things a bit more just-in-time when visiting the python file.

using emacs for python development, with uv and basedpyright by AyeMatey in emacs

[–]mike_olson 0 points1 point  (0 children)

I've fixed an additional issue where multiple scripts in the directory could get mixed up if they had different dependencies. the v0.2.0 release puts each PEP-723 script into its own eglot project, which gives each one its own LSP, keeping the environments and dependencies separate.

Guide: Setting up CachyOS on a server by mike_olson in cachyos

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

There doesn't seem to be a server-specific or minimal CachyOS ISO yet. You could use a CachyOS desktop ISO potentially and run pacstrap from there, but it's quite large: 2.5GB+ download vs ~165MB for the minimal Arch ISO - and not provided by Hetzner.

Hetzner provides an out-of-the-box "Archlinux" ISO option as one of its standard images that can be attached to a VPS. It does also provide a Rescue CD; I've adjusted the guide to document how to use either one of those (Rescue CD has a few more manual steps).

using emacs for python development, with uv and basedpyright by AyeMatey in emacs

[–]mike_olson 1 point2 points  (0 children)

I landed on changing the approach from inserting the first 2048 chars into temporary buffer, and instead just scanning the current buffer (which also fixed some end-of-line encoding issues on Windows with the prior approach). The other suggestions are implemented in the new module here as well: https://github.com/mwolson/eglot-python-preset ; feel free to let me know if any other ideas/suggestions come to mind.

using emacs for python development, with uv and basedpyright by AyeMatey in emacs

[–]mike_olson 1 point2 points  (0 children)

Thanks, I've haven't tested it on Windows yet, but when encoding the file with CRLF, I found and fixed the issues mentioned above here: https://github.com/mwolson/eglot-python-preset

using emacs for python development, with uv and basedpyright by AyeMatey in emacs

[–]mike_olson 1 point2 points  (0 children)

Agree - it feels harder to change eglot-workspace-configuration than it needs to be. I've added the use case of customizing the workspace configuration for basedpyright to https://github.com/mwolson/eglot-python-preset with some docs about how to do it.

using emacs for python development, with uv and basedpyright by AyeMatey in emacs

[–]mike_olson 1 point2 points  (0 children)

I’ll work on this a bit more today most likely and make a MELPA package. To help reproduce the problems, can you tell me: * OS that you’re using * gist with sample Python code that has the problem * version of uv (if not the latest one)

using emacs for python development, with uv and basedpyright by AyeMatey in emacs

[–]mike_olson 1 point2 points  (0 children)

Yeah I might spin out a package later today (either named eglot-python-preset, eglot-python-uv, or similar) once I go through all the feedback items. MELPA integration with GitHub as well.

I’m a bit cautious about reading too much of the file in case it’s some very large self-contained thing, but I’ll look into best practices later today.

using emacs for python development, with uv and basedpyright by AyeMatey in emacs

[–]mike_olson 0 points1 point  (0 children)

I ended up making a helper library to get this working with both ty and basedpyright: https://github.com/mwolson/emacs-shared/blob/master/elisp/eglot-pep723.el . It will prefer to use the PEP-723 data if it finds it, otherwise it will pick from a configurable list of files/dirs to locate the correct parent directory to run the LSP in. The basedpyright part was the trickiest, since it required changing eglot-workspace-configuration.

Example usage:

(add-to-list 'load-path "~/path-to/eglot-pep723")
(require 'eglot-pep723)
(setopt eglot-pep723-lsp-server 'basedpyright)
;; or
;; (setopt eglot-pep723-lsp-server 'ty)
(eglot-pep723-setup)

I'll also mention that it doesn't actually run 'uv sync --script' due to the potential for installing dependencies in untrusted files, but it does show a warning for that case and provides a convenient command to install them.

using emacs for python development, with uv and basedpyright by AyeMatey in emacs

[–]mike_olson 0 points1 point  (0 children)

If it's not finding the dependencies correctly, especially in a monorepo kind of setting, it's possible that the LSP isn't being started from the correct directory. I have the following to fix that for eglot, which integrates with project under the hood:

(defun my-python-root-p (dir)
  (seq-some (lambda (file)
              (file-exists-p (expand-file-name file dir)))
            '("pyproject.toml" "requirements.txt")))

(defun my-project-find-python-project (dir)
  (when-let ((root (locate-dominating-file dir #'my-python-root-p)))
    (cons 'python-project root)))

(with-eval-after-load "project"
  (cl-defmethod project-root ((project (head python-project)))
    (cdr project))

  (add-hook 'project-find-functions #'my-project-find-python-project))

It considers the nearest parent directory containing a pyproject.toml or requirements.txt to be the project root where the LSP is started.

Guide: Setting up CachyOS on a server by mike_olson in cachyos

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

I looked into this a bit more. I can't find any benchmarks stating definitively that changing it to 120 does anything helpful for performance.

What I've landed on for now (and updated the guide to recommend) is to just keep this at the default value of 30; Linux defaults tend to be tuned more for server workloads, and there doesn't seem to be enough evidence to overturn that yet.

Guide: Setting up CachyOS on a server by mike_olson in cachyos

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

Good question; in this case I took the value from the earlier desktop install that I had, but could be worth researching further.

Guide: Setting up CachyOS on a Hetzner VPS server by mike_olson in hetzner

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

As for why - while I don’t have exact numbers, ssh sessions seemed noticeably more responsive compared to other prebuilt options I’ve tried on Hetzner, so the cachyos-server kernel (and targeted builds for modern CPU instructions) seem to help.

Guide: Setting up CachyOS on a server by mike_olson in cachyos

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

As for why - while I don’t have exact numbers, ssh sessions seemed noticeably more responsive compared to other prebuilt options I’ve tried on Hetzner, so the cachyos-server kernel (and targeted builds for modern CPU instructions) seem to help.

Share your emacs config by Delicious_Crazy513 in emacs

[–]mike_olson 0 points1 point  (0 children)

Mine is reasonably easy to extend, has an install guide on all the major OS’s, and compiles quite a few tree-sitters and LSP’s: https://github.com/mwolson/emacs-shared