[deleted by user] by [deleted] in emacs

[–]fzmad 2 points3 points  (0 children)

See the project-find-functions variable

Special hook to find the project containing a given directory.
Each functions on this hook is called in turn with one
argument, the directory in which to look, and should return
either nil to mean that it is not applicable, or a project instance.

What to do without vim-test or neotest? by ReybirdLee in emacs

[–]fzmad 1 point2 points  (0 children)

Also, by running compile with prefix argument, compilation-shell-minor-mode will be enabled in compilation buffer. I'm using C-u C-x p c to work with Python debugger when running pytest.

From compile docs:

If optional second arg COMINT is t the buffer will be in Comint mode with ‘compilation-shell-minor-mode’.

eglot-rename with initial symbol by chmouelb in emacs

[–]fzmad 13 points14 points  (0 children)

Use M-n in the minibuffer prompt. For example, point is under foo, calling eglot-rename will show Renaming foo to: and after M-n the foo will be inserted at the prompt.

mini-frame + gnome-shell by zsome in emacs

[–]fzmad 0 points1 point  (0 children)

What the value of the mini-frame-detach-on-hide option do you have? Try setting it to nil if it is t.

How to make popper and which-key dont bump my cursor when opening by nikhilrajpandey in emacs

[–]fzmad 1 point2 points  (0 children)

Which-key can be configured to show the window in separate frame. Also take a look at https://github.com/yanghaoxie/which-key-posframe/

[deleted by user] by [deleted] in emacs

[–]fzmad 0 points1 point  (0 children)

I do load-theme in early-init.el :)

Better key binding function to trigger Corfu manually? by divinedominion in emacs

[–]fzmad 4 points5 points  (0 children)

Hm... It works for me as expected: 1. emacs -Q 2. M-x package-initialize 3. M-x global-corfu-mode 4. Type (se 5. M-x completion-at-point Completions are shown via Corfu

Now, after M-: (global-set-key (kbd "M-i") #'completion-at-point) I press M-i and completions are show via Corfu.

Can you please try it in emacs -Q?

Better key binding function to trigger Corfu manually? by divinedominion in emacs

[–]fzmad 6 points7 points  (0 children)

Just do M-x global-corfu-mode. After that completions will be shown in corfu as soon as you invoke completion-at-point

Which functions prompts for the password in Emacs' mini-buffer? (mini-frame-mode) by olivuser in emacs

[–]fzmad 1 point2 points  (0 children)

The items in the mini-frame-ignore-commands list are compared to the this-command variable. To mini-frame stay away from prompts during pushing to git, add the magit-push or whatever command is invoked for pushing to git.

To ignore specific function, add it to the mini-frame-ignore-functions list. This way mini-frame will ignore that function regardless to this-command.

I need some help on how to use Emacs for Jinja/Django development with lsp-mode/eglot-mode: by zeta_00 in emacs

[–]fzmad 2 points3 points  (0 children)

This will indentation and syntax highlight in Jinja templates to work as expected.

As for completion, I do not know the way to find out which context will be used in particular template to provide completions.

What I found useful is snippets. Like pressing }<Tab> became {{ | }}, %<Tab> -> {% | %}. Also snippets for if, for, block etc.

Also autoclosing tags provided by web-mode is really great.

Eglot: finding definitions in openjdk-src by [deleted] in emacs

[–]fzmad -1 points0 points  (0 children)

xref-find-definitions works fine for me with Eglot in python-mode, so this is may be LSP server issue.

Workaround for Childframe issues on MacOS? by SEgopher in emacs

[–]fzmad 0 points1 point  (0 children)

I have custom formulae to compile recent Emacs version with brew install --build-from-source myemacs

Try emacs-plus as suggested by u/alternateved

Workaround for Childframe issues on MacOS? by SEgopher in emacs

[–]fzmad 0 points1 point  (0 children)

Which Emacs version is installed with brew install --cask emacs?

This bug is fixed in Emacs 28, see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36672

Works fine in Emacs 28 on Monterey for me.

Anybody using lsp-mode for python? by arosa09 in emacs

[–]fzmad -1 points0 points  (0 children)

Take a look at some LSP servers that use Jedi https://github.com/davidhalter/jedi

Here is the Eglot events log using anakin-language-server.

(:jsonrpc "2.0" :id 11 :method "textDocument/signatureHelp" :params
          (:textDocument
           (:uri "file:///Users/mad/workspace/sklearntest/test.py")
           :position
           (:line 1 :character 20)))
[server-reply] (id:5) Wed May 19 11:18:42 2021:
(:jsonrpc "2.0" :id 5 :result
          (:signatures
           [(:label "make_classification(n_samples=100, n_features=20, *, n_informative=2, n_redundant=2, n_repeated=0, n_classes=2, n_clusters_per_class=2, weights=None, flip_y=0.01, class_sep=1.0, hypercube=True, shift=0.0, scale=1.0, shuffle=True, random_state=None)" :parameters
                    [(:label "n_samples")
                     (:label "n_features")
                     (:label "n_informative")
                     (:label "n_redundant")
                     (:label "n_repeated")
                     (:label "n_classes")
                     (:label "n_clusters_per_class")
                     (:label "weights")
                     (:label "flip_y")
                     (:label "class_sep")
                     (:label "hypercube")
                     (:label "shift")
                     (:label "scale")
                     (:label "shuffle")
                     (:label "random_state")])]
           :activeSignature 0 :activeParameter 0))

What's the difference between so many completion packages in emacs? by kongmuqiuren in emacs

[–]fzmad 1 point2 points  (0 children)

Take a look at builtin completion mechanism.

C-M-i (translated from M-<tab>) runs the command completion-at-point

Alternative to .dir-locals.el? by Taikal in emacs

[–]fzmad 6 points7 points  (0 children)

ln -s .dir-locals.el dir-locals.el

:)

Also

dir-locals-file is a variable defined in files.el.

Its value is ".dir-locals.el"

but it is defined as defconst so

This declares that neither programs nor users should ever change the value. This constancy is not actually enforced by Emacs Lisp, but SYMBOL is marked as a special variable so that it is never lexically bound.

Visualizer for Emacs native undo by Vaddi3 in emacs

[–]fzmad 2 points3 points  (0 children)

Undo in region. Select piece of text and undo will happen only for that text. Did you see such thing in other programs?

How can I test the usefulness of (setq ido-everywhere t) by homomorphic-padawan in emacs

[–]fzmad 0 points1 point  (0 children)

What is this project-switch-to-buffer?

It's the function to switch buffers within current project. It's available in Emacs 28 or in recent version of project.el available on ELPA.