clason

clason

Member Since 9 years ago

University of Graz, Graz, Austria

Experience Points
54
follower
Lessons Completed
1
follow
Lessons Completed
11
stars
Best Reply Awards
22
repos

1209 contributions in the last year

Pinned
⚡ Generalized primal-dual proximal splitting
Activity
May
23
12 hours ago
May
22
1 day ago
Activity icon
issue

clason issue comment latex-lsp/texlab

clason
clason

Use custom citation rendering instead of citeproc-rs

With this change set, texlab will not depend on citeproc-rs anymore. Instead, texlab uses the built-in BibTeX parser to render BibTeX references without having to depend on a TeX engine or a JavaScript library.

Notable changes:

  • Much faster (release) build times and smaller binary size
  • No git dependencies (and overall less heavy dependencies) required
clason
clason

Thank you! But (fair warning: I am a bit pedantic on these matters) I actually only meant book titles ;)

Basically,

  1. the main "object" (journal name, book title, thesis title, collection title, etc.) should be italic and Title Case;
  2. the individual contribution (article title, chapter title, part in collection, etc.) should be in quotes (or just upright without quotes) and Sentence case.

But that's just my personal style guide (it makes it easier to distinguish at a glance books and other major works from articles); anything here is fine.

Activity icon
issue

clason issue comment neovim/neovim

clason
clason

refactor(runtime): convert remaining dist#ft functions to lua

Follow-up to #18430 (working on #18604).

clason
clason

Thank you very much! Your efforts are very much appreciated -- that's one big check for #18604 ;)

Next up is ~Malenia~ scripts.vim, if you're up for a boss fight ;)

open pull request

clason wants to merge neovim/neovim

clason
clason

feat(filetype): add more filetype patterns to Lua

Porting some more of the missing filetype patterns to filetype.lua

clason
clason

I personally don't care enough not to agree with @gpanders, but I do like consistency :)

pull request

clason merge to neovim/neovim

clason
clason

feat(filetype): add more filetype patterns to Lua

Porting some more of the missing filetype patterns to filetype.lua

pull request

clason pull request nvim-treesitter/nvim-treesitter

clason
clason

Update lockfile.json

Automated changes by create-pull-request GitHub action

pull request

clason merge to nvim-treesitter/nvim-treesitter

clason
clason

Update lockfile.json

Automated changes by create-pull-request GitHub action

May
21
2 days ago
Activity icon
issue

clason issue comment latex-lsp/texlab

clason
clason

Use custom citation rendering instead of citeproc-rs

With this change set, texlab will not depend on citeproc-rs anymore. Instead, texlab uses the built-in BibTeX parser to render BibTeX references without having to depend on a TeX engine or a JavaScript library.

Notable changes:

  • Much faster (release) build times and smaller binary size
  • No git dependencies (and overall less heavy dependencies) required
clason
clason

To be honest, I don't see much difference (which is a good thing -- I didn't have anything to complain about until now ;))

Two things I noticed, which are not at all dealbreakers:

  1. I think I liked the formatting of citeproc better in a few(!) regards: no "In: ..." and "pp." -- that's the first thing I remove whenever I use biblatex ;) -- and book titles in italics instead of quotes.
  2. Would be great to show the eprint, too, as in
  eprinttype = {arxiv},
  eprint = {2205.11111},

Oh, and in @part, I had an "In: <booktitle>", which should be In: "<booktitle>" for consistency (or, better, `In: ).

But really, it works very well as-is; the preview is just for a quick check, not printing according to a style manual!

Activity icon
issue

clason issue comment latex-lsp/texlab

clason
clason

Use custom citation rendering instead of citeproc-rs

With this change set, texlab will not depend on citeproc-rs anymore. Instead, texlab uses the built-in BibTeX parser to render BibTeX references without having to depend on a TeX engine or a JavaScript library.

Notable changes:

  • Much faster (release) build times and smaller binary size
  • No git dependencies (and overall less heavy dependencies) required
clason
clason

Will do when I am back at a computer; first thing to test will be biblatex specific entries ;)

push

clason push clason/neovim

clason
clason

ci: fix lint errors caused by missing includes (#18673)

This will fix the check-single-includes check which started failing after https://github.com/neovim/neovim/pull/18663/.

commit sha: 1f1a65a9e4c602cd80458b213c28eadbdb5b1de1

push time in 1 day ago
push

clason push neovim/neovim

clason
clason

ci: fix lint errors caused by missing includes (#18673)

This will fix the check-single-includes check which started failing after https://github.com/neovim/neovim/pull/18663/.

commit sha: 1f1a65a9e4c602cd80458b213c28eadbdb5b1de1

push time in 1 day ago
pull request

clason pull request neovim/neovim

clason
clason

ci: fix lint errors caused by missing includes

This will fix the check-single-includes check which started failing after https://github.com/neovim/neovim/pull/18663/.

pull request

clason pull request neovim/neovim

clason
clason

[Backport release-0.7] fix(autocmds): separate command from desc (#18617)

Manual cherry-pick

Activity icon
issue

clason issue comment neovim/neovim

clason
clason

[Backport release-0.7] fix(autocmds): separate command from desc (#18617)

Manual cherry-pick

clason
clason

oof, I missed that this depends on @dundargoc's ongoing refactoring efforts. Somebody else needs to take care of this (or remove the backport label from the original if it's not feasible or reasonable).

pull request

clason pull request neovim/neovim

clason
clason

[Backport release-0.7] fix(autocmds): separate command from desc (#18617)

Activity icon
created branch

clason in neovim/neovim create branch backport-aufix

createdAt 1 day ago
push

clason push clason/neovim

clason
clason

fix(autocmds): separate command from desc (#18617)

commit sha: 55246d44f92beb17898d006e5324bf2d44f44c31

push time in 1 day ago
push

clason push neovim/neovim

clason
clason

fix(autocmds): separate command from desc (#18617)

commit sha: 55246d44f92beb17898d006e5324bf2d44f44c31

push time in 1 day ago
pull request

clason pull request neovim/neovim

clason
clason

fix(autocmds): separate command from desc

Fixes the mangling of desc and command for callbacks when reading from nvim_get_autocmds.

I assume it was done to help support readability when using :autocmd, so I made sure to keep that behavior but with a small twist (appending callback type before), see examples below.

This also adds the benefit of seeing the description for string commands from :autocmds

Fixes #17588

Note: possibly related to https://github.com/neovim/neovim/issues/17639

Example

  -- vim.api.nvim_create_augroup("test_group", { clear = true })
vim.api.nvim_create_autocmd("BufWritePre", {
  pattern = "*.py",
  group = "test_group",
  command = "echo 'hello1'",
  desc = "dispatch hello1",
})
vim.api.nvim_create_autocmd("BufWritePre", {
  pattern = "*.py",
  group = "test_group",
  callback = function()
    print "hello2"
  end,
  desc = "dispatch hello2",
})
  • before

    with :lua =vim.api.nvim_get_autocmds { group = "test_group" })

    { {
      buflocal = false,
      command = "echo 'hello1'",
      desc = "dispatch hello1",
      event = "BufWritePre",
      group = 54,
      group_name = "test_group",
      id = 52,
      once = false,
      pattern = "*.py"
    }, {
      buflocal = false,
      command = "dispatch hello2",
      desc = "dispatch hello2",
      event = "BufWritePre",
      group = 54,
      group_name = "test_group",
      id = 53,
      once = false,
      pattern = "*.py"
    } }
    

    with :autocmd BufWritePre

    --- Autocommands ---
    test_group  BufWritePre
        *.py      echo 'hello1'
                  dispatch hello2
    
  • after

    with :lua =vim.api.nvim_get_autocmds { group = "test_group" })

    { {
        buflocal = false,
        command = "echo 'hello1'",
        desc = "dispatch hello1",
        event = "BufWritePre",
        group = 54,
        group_name = "test_group",
        id = 55,
        once = false,
        pattern = "*.py"
      }, {
        buflocal = false,
        command = "<Lua function 113>",
        desc = "dispatch hello2",
        event = "BufWritePre",
        group = 54,
        group_name = "test_group",
        id = 56,
        once = false,
        pattern = "*.py"
      } }
    

    with :autocmd BufWritePre

    --- Autocommands ---
    test_group  BufWritePre
        *.py      echo 'hello1' [dispatch hello1]
                  <Lua function 113> [dispatch hello2]
    
Activity icon
issue

clason issue neovim/neovim

clason
clason

`command` and `desc` fields are the same in return of `nvim_get_autocmds()`

Neovim version (nvim -v)

NVIM v0.7.0-dev+1177-g7211d8ef2

Vim (not Nvim) behaves the same?

no

Operating system/version

macOS 11.6

Terminal name/version

iTerm2 Build 3.5.0beta4

$TERM environment variable

xterm-256color

Installation

build from repo

How to reproduce the issue

nvim --clean -u minimal.lua

minimal.lua

vim.api.nvim_create_autocmd({ 'InsertEnter' }, {
  callback = function ()
  end,
})
vim.api.nvim_create_autocmd({ 'InsertEnter' }, {
  desc = 'It is desc',
  callback = function ()
  end,
})
print(vim.inspect(vim.api.nvim_get_autocmds({ event = { 'InsertEnter' } })))

Expected behavior

When nvim_create_autocmd() with callback but without desc was called, the desc field of the return of nvim_get_autocmds() should be empty. Also, when that with callback and desc is called the command field should be <Lua function n> or something else.

{ {
    buflocal = false,
    command = "<Lua function 4>",
    desc = "",
    event = "InsertEnter",
    id = 1,
    once = false,
    pattern = "*"
  }, {
    buflocal = false,
    command = "<Lua function 4>",
    desc = "It is desc",
    event = "InsertEnter",
    id = 2,
    once = false,
    pattern = "*"
  } }

Actual behavior

The command and desc fields are the same.

{ {
    buflocal = false,
    command = "<Lua function 4>",
    desc = "<Lua function 4>",
    event = "InsertEnter",
    id = 1,
    once = false,
    pattern = "*"
  }, {
    buflocal = false,
    command = "It is desc",
    desc = "It is desc",
    event = "InsertEnter",
    id = 2,
    once = false,
    pattern = "*"
  } }
Activity icon
issue

clason issue comment neovim/neovim

clason
clason

you can mark as vim-patch:partial <hash> and comment on which patches are needed to port the skipped files. (Translations and desktop files are N/A; just ignore those; manual rewrite can be deferred as well.)

Activity icon
issue

clason issue comment neovim/neovim

clason
clason

fix(autocmds): separate command from desc

Fixes the mangling of desc and command for callbacks when reading from nvim_get_autocmds.

I assume it was done to help support readability when using :autocmd, so I made sure to keep that behavior but with a small twist (appending callback type before), see examples below.

This also adds the benefit of seeing the description for string commands from :autocmds

Fixes #17588

Note: possibly related to https://github.com/neovim/neovim/issues/17639

Example

  -- vim.api.nvim_create_augroup("test_group", { clear = true })
vim.api.nvim_create_autocmd("BufWritePre", {
  pattern = "*.py",
  group = "test_group",
  command = "echo 'hello1'",
  desc = "dispatch hello1",
})
vim.api.nvim_create_autocmd("BufWritePre", {
  pattern = "*.py",
  group = "test_group",
  callback = function()
    print "hello2"
  end,
  desc = "dispatch hello2",
})
  • before

    with :lua =vim.api.nvim_get_autocmds { group = "test_group" })

    { {
      buflocal = false,
      command = "echo 'hello1'",
      desc = "dispatch hello1",
      event = "BufWritePre",
      group = 54,
      group_name = "test_group",
      id = 52,
      once = false,
      pattern = "*.py"
    }, {
      buflocal = false,
      command = "dispatch hello2",
      desc = "dispatch hello2",
      event = "BufWritePre",
      group = 54,
      group_name = "test_group",
      id = 53,
      once = false,
      pattern = "*.py"
    } }
    

    with :autocmd BufWritePre

    --- Autocommands ---
    test_group  BufWritePre
        *.py      echo 'hello1'
                  dispatch hello2
    
  • after

    with :lua =vim.api.nvim_get_autocmds { group = "test_group" })

    { {
        buflocal = false,
        command = "echo 'hello1'",
        desc = "dispatch hello1",
        event = "BufWritePre",
        group = 54,
        group_name = "test_group",
        id = 55,
        once = false,
        pattern = "*.py"
      }, {
        buflocal = false,
        command = "<Lua function 113>",
        desc = "dispatch hello2",
        event = "BufWritePre",
        group = 54,
        group_name = "test_group",
        id = 56,
        once = false,
        pattern = "*.py"
      } }
    

    with :autocmd BufWritePre

    --- Autocommands ---
    test_group  BufWritePre
        *.py      echo 'hello1' [dispatch hello1]
                  <Lua function 113> [dispatch hello2]
    
clason
clason

@gpanders Lint failure is not relevant and fixed by #18673 (go ahead and merge that if it looks good to you)

Activity icon
issue

clason issue comment neovim/neovim

clason
clason

docs: remove Vi defaults from documentation

It's not relevant and clutters the documentation.

clason
clason

I just remembered that defaults.vim is a thing.

Not in Neovim, it isn't. (Thankfully.)

pull request

clason pull request nvim-treesitter/nvim-treesitter

clason
clason

Update README

Automated changes by create-pull-request GitHub action

pull request

clason pull request nvim-treesitter/nvim-treesitter

clason
clason

Update README

Automated changes by create-pull-request GitHub action

pull request

clason pull request nvim-treesitter/nvim-treesitter

clason
clason

Update README

Automated changes by create-pull-request GitHub action

Previous