beardbolt icon indicating copy to clipboard operation
beardbolt copied to clipboard

Doesn't work with c++-ts-mode

Open chriselrod opened this issue 1 year ago • 2 comments

I'd mostly appreciate if you could give it some hard testing. I'm not using at the moment.

I tried adding ts- mode variants to bb-languages:

(use-package beardbolt
  :straight (:host github :repo "joaotavora/beardbolt" :files (:defaults "starters"))
  :config
  (setq bb-languages `((c-mode    ,#'bb--c/c++-setup :base-cmd "gcc" :language "c")
                       (c-ts-mode    ,#'bb--c/c++-setup :base-cmd "gcc" :language "c")
                       (c++-mode  ,#'bb--c/c++-setup :base-cmd "g++" :language "c++")
                       (c++-ts-mode  ,#'bb--c/c++-setup :base-cmd "g++" :language "c++")
                       (rust-mode ,#'bb--rust-setup)
                       (rust-ts-mode ,#'bb--rust-setup)))
  :custom
  (bb-asm-format 'intel))

and trying the C++ example, I get

Debugger entered--Lisp error: (void-function nil)
  nil()
  apply(nil nil)
  beardbolt-compile(nil)
  funcall-interactively(beardbolt-compile nil)
  command-execute(beardbolt-compile)

However, it seems to work fine if I activate c++-mode instead.

chriselrod avatar Mar 14 '23 04:03 chriselrod

Also, how do I use this if I don't want to define a main?

chriselrod avatar Mar 14 '23 04:03 chriselrod

I'd mostly appreciate if you could give it some hard testing. I'm not using at the moment.

I tried adding ts- mode variants to bb-languages:

(use-package beardbolt
  :straight (:host github :repo "joaotavora/beardbolt" :files (:defaults "starters"))
  :config
  (setq bb-languages `((c-mode    ,#'bb--c/c++-setup :base-cmd "gcc" :language "c")
                       (c-ts-mode    ,#'bb--c/c++-setup :base-cmd "gcc" :language "c")
                       (c++-mode  ,#'bb--c/c++-setup :base-cmd "g++" :language "c++")
                       (c++-ts-mode  ,#'bb--c/c++-setup :base-cmd "g++" :language "c++")
                       (rust-mode ,#'bb--rust-setup)
                       (rust-ts-mode ,#'bb--rust-setup)))
  :custom
  (bb-asm-format 'intel))

and trying the C++ example, I get

Debugger entered--Lisp error: (void-function nil)
  nil()
  apply(nil nil)
  beardbolt-compile(nil)
  funcall-interactively(beardbolt-compile nil)
  command-execute(beardbolt-compile)

However, it seems to work fine if I activate c++-mode instead.

I got c++-ts-mode working by modifying the bb-languages with an add-to-list. My config contains these line and the ts modes work great. (add-to-list 'bb-languages (c++-ts-mode (bb--c/c++-setup :base-cmd "g++" :language "c++"))

killrpenguin avatar Mar 26 '24 17:03 killrpenguin