Tuesday, May 17, 2022

macOS: follow mouse focus on all windows

Use this gem: yabai.
If you just want the follow focus behavior, you don't even need to disable System Integrity Protection. Just use:
> vi ~/.yabairc
yabai -m config focus_follows_mouse autofocus
And then
> chmod +x ~/.yabairc
> brew services start yabai

macOS: how to move or delete backward in iTerm2

Source: With iTerm2 on Mac, how to delete forward a word from cursor on command-line?

Friday, March 18, 2022

Elixir: Emacs lsp-mode: Unchecked dependencies for environment test

Source: https://github.com/elixir-lsp/vscode-elixir-ls/issues/132#issuecomment-743332723
Sometimes, the lsp-mode of Emacs remains stubbornly stuck on an error like:
MIX_ENV: test
MIX_TARGET: host
Unchecked dependencies for environment test:
* decimal (Hex package)
  the dependency does not match the requirement "~> 1.0", got "2.0.0"

18:56:16.378 [error] Process #PID<0.122.0> raised an exception
** (Mix.Error) Can't continue due to errors on dependencies
    (mix 1.13.1) lib/mix.ex:515: Mix.raise/2
    (mix 1.13.1) lib/mix/tasks/deps.loadpaths.ex:34: Mix.Tasks.Deps.Loadpaths.run/1
    (mix 1.13.1) lib/mix/task.ex:397: anonymous fn/3 in Mix.Task.run_task/3
    (mix 1.13.1) lib/mix/tasks/loadpaths.ex:40: Mix.Tasks.Loadpaths.run/1
    (mix 1.13.1) lib/mix/task.ex:397: anonymous fn/3 in Mix.Task.run_task/3
    (mix 1.13.1) lib/mix/tasks/compile.ex:123: Mix.Tasks.Compile.run/1
    (mix 1.13.1) lib/mix/task.ex:397: anonymous fn/3 in Mix.Task.run_task/3
    (language_server 0.8.2) lib/language_server/build.ex:200: ElixirLS.LanguageServer.Build.compile/0

In order to get out of this situation, do
> rm -rf .elixir_ls/build

Tuesday, March 8, 2022

Elixir: lsp-mode: No mixfile found in project. To use a subdirectory, set `elixirLS.projectDir` in your settings.

I'm using a mono-repo on GitHub, and this is the error message I get in Emacs/*lsp-log* buffer when adding a new sub-directory in the repo.
In order to fix that, you can update ~/.emacs.d/.lsp-session-v1 to manually add the sub-directory.
> vi ~/.emacs.d/.lsp-session-v1

#s(lsp-session ("/Users/jerome/src/repo" "/Users/jerome/src/boss/sub-directory...

And then bounce Emacs.
Source: https://github.com/elixir-lsp/elixir-ls/issues/364