Comments (4)
after!
takes the name of a package. There is no package named snippets
. If you replace it with yasnippet
, then it should work.
from snippets.
I changed the line (after! snippets
to (after! yasnippet
but I still have the same issue. M-x menu-bar-open
YASnippet>pyhton-mode
for example seems to show only the snippets in the python-mode
subdirectories of .doom.d/snippets
and the doom-snippets
repo.
I also had a couple of other questions:
-
Is it possible to selectively disable snippets defined in the
doom-snippets
repo? I have a snippet with keywordfr
for\frac{$1}{$2}
in LaTeX mode, butfr<TAB>
shows a menu with the selection from thedoom-snippets
repo also displayed. -
Can the precedence for
<TAB>
beyas-expand
thencompany-complete
if no snippet expansion is found? Right now the company completion popup appears on pressing<TAB>
, even if the text before corresponds to a snippet keyword, and snippet expansion is often only possible if I can press<TAB>
before the company delay. If that is not possible, how should I disable company mode? I tried(remove-hook 'LaTeX-mode-hook #'company!)
but that seems to work only partially.
Thanks for your help.
from snippets.
Can the precedence for be yas-expand then company-complete if no snippet expansion is found?
This is already the case, unless you've disabled :config (default +bindings)
or remapped TAB
yourself.
Is it possible to selectively disable snippets defined in the doom-snippets repo?
This should also already be the case, unless you've disabled :editor snippets
OR you've cloned doom-snippets
to ~/.doom.d/snippets. Otherwise, if you have a private snippet in ~/.doom.d/snippets
with the same name as a built-in snippet, yours will shadow the built-in one (it won't prompt about it, it'll just use yours, unless you have duplicates in your private snippet library).
from snippets.
I fixed most of the issues by disabling company-mode
for tex files, as I use yasnippets
and cdlatex
in any case for most of the expansions, and the shadowing issue by duplicating the file from the doom repo and giving it a different trigger-key. However, snippets defined by
(after! yasnippet
(yas-define-snippets
'asy-mode
'(
("gm" "import geometry;\n$0" "i_geometry")
("PI" "path ${1:P} = ${2:pA}--${3:pB};\n$0" "pathI"))))
are not recognized in asy mode, although they are when converted to individual snippets in the doom.d/snippets/asy-mode
directory. As yas-define-snippets
is not widely used and probably giving rise to an obscure error, I will look into converting the snippet definitions to individual files.
from snippets.
Related Issues (20)
- snippets always append a new line even though I `require-final-newline` to nil
- Can't undo snippets HOT 2
- Chaining snippets
- Accidently triggering nested snippets in LaTeX math HOT 1
- Labels in LaTeX snippets HOT 2
- Fundamental-mode snippets pi and phi conflict with julia-latexsub HOT 10
- Update org-mode snippets to use lowercase for blocks HOT 1
- Missing plantuml-mode snippets
- Isn't there a need for a "keyword list convention" or a contribution guide? HOT 1
- <s snippet does not expand in org-mode HOT 3
- Editing or disabling some of the predefined snippets HOT 1
- doom sync is giving me "Symbol's function definition is void" when doing a fresh install HOT 4
- `bang` fundamental mode snippet only on first line HOT 1
- Please add uuid to all snippets HOT 1
- `org-mode/chinese_...` snippets evaluation error HOT 1
- Org mode: Duplicate snippets HOT 1
- No such file or directory doom-snippets-lib after requiring yasnippet from my package HOT 5
- [go] spurious space when using `const` snippet in go-mode HOT 1
- erlang-mode snippets
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snippets.