Skip to content

Instantly share code, notes, and snippets.

@mjlbach
mjlbach / gist:a3349d94a8d9e8bb6473d2924ccde425
Created October 15, 2021 04:34
pyright_desynchronization.log
[DEBUG][2021-10-14 21:08:43] .../lua/vim/lsp.lua:1051 "on_lines bufnr: 1, changedtick: 4, firstline: 0, lastline: 1, new_lastline: 1, old_byte_size: 1, old_utf32_size: 1, old_utf16_size: 1" { "f" }
[DEBUG][2021-10-14 21:08:43] .../vim/lsp/rpc.lua:337 "rpc.send" {
jsonrpc = "2.0",
method = "textDocument/didChange",
params = {
contentChanges = { {
range = {
end = {
character = 0,
line = 0
@mjlbach
mjlbach / effective_questions.md
Last active September 17, 2022 18:30
Asking effective questions

Foreword

The open source community depends on the efforts of a small group of volunteers relative to the number of users. In order to make the most of contributors' time, here is some advice for asking “good questions”. This is largely paraphrased from this article by Eric Steven Raymond and Rick Moen, with edits for brevity and tone. If you have the time (and tolerance), I strongly recommend reading that article over this one. Let's start with the procedure.

The procedure

  1. Try to find an answer by searching the archives of the issue-tracker, IRC, matrix-room, discord, forum or mailing list you plan to post to.
  2. Try to find an answer by searching the Web.
  3. Try to find an answer by reading the manual.
  4. Try to find an answer by reading a FAQ.
  5. Try to find an answer by inspection or experimentation.
@mjlbach
mjlbach / minimal_init.lua
Created January 26, 2021 20:13
Issue #272 Repro
local execute = vim.api.nvim_command
local fn = vim.fn
local install_path = "/tmp/site/pack/packer/opt/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
execute("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
end
execute "packadd packer.nvim"
LaunchPyright = function()
local client_id = vim.lsp.start_client({cmd = {"pyright-langserver", "--stdio"};})
vim.lsp.buf_attach_client(0, client_id)
end
vim.cmd([[
command! -range LaunchPyright execute 'lua LaunchPyright()'
]])
self: super:
let
  libPath = with super; lib.concatStringsSep ":" [
    "${lib.getLib libgccjit}/lib/gcc/${stdenv.targetPlatform.config}/${libgccjit.version}"
    "${lib.getLib stdenv.cc.cc}/lib"
    "${lib.getLib stdenv.glibc}/lib"
  ];
  rev = "b7adb08f960fe6568f702b8f328e65e3833ffc13";
  sha256 = "0p852k5wf8sy9h7x2z6iivf9xnhpy85vly9fn0a1qj2japrhvyr2";
@mjlbach
mjlbach / gccEmacs.md
Last active December 6, 2023 10:34
Installing gccEmacs (native-comp) with Nix

WARNING: THIS GIST IS OUT OF DATE AND NO LONGER RELEVANT

  • Native-comp was enabled by default in nixpgks
  • Pgtk is not enabled by default, for that you can either override the derivation or use emacsPgtk from the nix-community emacs overlay if you don't want to build it yourself

Nix

Adding the overlay and configuring cachix