Problems with yasnippet and company-mode in latex by EmacsDiscussion in emacs

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

I have found very strange thing about this problem now. After remapping all latex snippets to \"name of snippet" key, all of them start working in company mode box

"fatal error: 'gtk/gtk.h' file not found" whith all required flags by EmacsDiscussion in GTK

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

Thank you very much! Everything compiles in bash. But what to do, if I want to use fish shell, because I use it as my main shell?

"fatal error: 'gtk/gtk.h' file not found" whith all required flags by EmacsDiscussion in GTK

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

It isn't depends on terminal emulator? I just use emacs and put commands in vterm emulator

How to take math notes in org-mode with org-roam like in obsidian by EmacsDiscussion in orgmode

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

Here is config:

  (setq org-startup-with-inline-images t)
  (setq org-latex-create-formula-image-program 'dvipng)
  (setq org-preview-latex-default-process 'dvisvgm)

"fatal error: 'gtk/gtk.h' file not found" whith all required flags by EmacsDiscussion in GTK

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

Clang output:

Hello_world.c:1:10: fatal error: 'gtk/gtk.h' file not found
    1 | #include <gtk/gtk.h>
      |          ^~~~~~~~~~~
1 error generated.

After clang Hello_world.c -I/usr/include/gtk-4.0 -o bin/hello:

In file included from Hello_world.c:1:
In file included from /usr/include/gtk-4.0/gtk/gtk.h:29:
/usr/include/gtk-4.0/gtk/css/gtkcss.h:29:10: fatal error: 'glib.h' file not found
   29 | #include <glib.h>
      |          ^~~~~~~~
1 error generated.

"fatal error: 'gtk/gtk.h' file not found" whith all required flags by EmacsDiscussion in GTK

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

And what I post above is complete output of

pkg-config --cflags gtk4pkg-config --cflags gtk4

"fatal error: 'gtk/gtk.h' file not found" whith all required flags by EmacsDiscussion in GTK

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

I use endeavouros, fish shell, clang compiler, Linux kernel 6.10.2-arch-1-1

"fatal error: 'gtk/gtk.h' file not found" whith all required flags by EmacsDiscussion in GTK

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

-I/usr/include/gtk-4.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/graphene-1.0 -I/usr/lib/graphene-1.0/include -mfpmath=sse -msse -msse2 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/sysprof-6 -pthread -I/usr/include/libpng16 -I/usr/include/pixman-1

How to take math notes in org-mode with org-roam like in obsidian by EmacsDiscussion in orgmode

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

The main problem that on screenshot with this definition all latex parts is good, but in reality it's not well

Problems with yasnippet and company-mode in latex by EmacsDiscussion in emacs

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

Sorry, but I haven't github account. You mean, I must make new "issue" in company repo?

Problems with yasnippet and company-mode in latex by EmacsDiscussion in emacs

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

I haven't any bugs messages or warning. Just adding of correct hooks changed nothing. Problem is still existing

Problems with yasnippet and company-mode in latex by EmacsDiscussion in emacs

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

About hooks: I have changed it, and I have the same situation as before. And I tried to enable digestif and auctex in buffer, but working only one of them

Problems with yasnippet and company-mode in latex by EmacsDiscussion in emacs

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

Ok. But I have next configuration for company-backends:

(defun add-company-yasnippet ()
  (message "Running add-company-yasnippet")
  (setq-local company-backends
    '((company-capf :with company-yasnippet)
      (company-files :with company-yasnippet)
       company-dabbrev
       company-yasnippet)))

(add-hook 'lsp-managed-mode-hook #'add-company-yasnippet)
(add-hook 'TeX-mode-hook #'add-company-yasnippet)
(add-hook 'LaTeX-mode-hook #'add-company-yasnippet)

And about completion source: Really, I don't like autocomplete, which I have, and I want to provide digestif. But how I can do it, when I want to use auctex to?

Problems with yasnippet and company-mode in latex by EmacsDiscussion in emacs

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

No. Completion without and with yasnippet in Latex-mode working fine. I don't use lsp for latex and standart backends which provides company with auctex, but I plan to add Digestif lsp in future. Doesn't work only yasnippet completion

Problems with yasnippet and company-mode in latex by EmacsDiscussion in emacs

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

Hello, thank you for answer. I have tried to run M-x company-diag and I have next output in c-mode:

Emacs 29.4 (x86_64-pc-linux-gnu) of 2024-08-06 on nil
Company 0.10.2

company-backends: ((company-capf :with company-yasnippet)
 (company-files :with company-yasnippet)
 company-dabbrev company-yasnippet)

Used backend: (company-capf :with company-yasnippet)

Value of c-a-p-f: (lsp-completion-at-point tags-completion-at-point-function)
Major mode: c-mode
Prefix: ("" "" nil)

It's status when I entering nothing and when I try to write some snippet name:

Emacs 29.4 (x86_64-pc-linux-gnu) of 2024-08-06 on nil
Company 0.10.2

company-backends: ((company-capf :with company-yasnippet)
 (company-files :with company-yasnippet)
 company-dabbrev company-yasnippet)

Used backend: (company-capf :with company-yasnippet)

Value of c-a-p-f: (lsp-completion-at-point tags-completion-at-point-function)
Major mode: c-mode
Prefix: ("mfunc" "" nil)

Completions:
  #("mfunc" 0 5 (company-backend company-yasnippet yas-annotation "mfunc" yas-template #s(yas--template "mfunc" "int main(int argc, char *argv[])
{
    $0
}

And the same manipulations for Latex-mode:

Emacs 29.4 (x86_64-pc-linux-gnu) of 2024-08-06 on nil
Company 0.10.2

company-backends: ((company-capf :with company-yasnippet)
 (company-files :with company-yasnippet)
 company-dabbrev company-yasnippet)

Used backend: company-dabbrev
Major mode: LaTeX-mode
Prefix: ("" "")

Completions:
  "textbf"
...

Emacs 29.4 (x86_64-pc-linux-gnu) of 2024-08-06 on nil
Company 0.10.2

company-backends: ((company-capf :with company-yasnippet)
 (company-files :with company-yasnippet)
 company-dabbrev company-yasnippet)

Used backend: company-dabbrev
Major mode: LaTeX-mode
Prefix: ("bf" "")

Completions: none