Comments (6)
Sorry about the late reply. Off the top of my head I think php-auto-yasnippet-required-files
needs to be a cons, e.g.:
(php-auto-yasnippet-required-files . (list "~/project/vendor/autoload.php"))
And if that's the case then I need to correct the example in the README.
from php-auto-yasnippets.
@ejmr perhaps related: I'm not seeing the error message that @krystalcode noted, but I don't get any output either. Weirdly, I can't seem to set the php-auto-yasnippet-required-files
variable through M-x set-variable
.
In my .dir-locals.el
file at ~/src/myproject/.dir-locals.el
, I have:
(php-auto-yasnippet-required-files . (list "~/src/myproject/vendor/autoload.php"))
If I run this command in my terminal:
php ~/.emacs.d/elpa/php-auto-yasnippets-20141128.1411/Create-PHP-YASnippet.php base_path --require-once ~/src/myproject/vendor/autoload.php
Then I get this output which is correct:
#key: base_path
#name: base_path
# --
base_path(${1:[$path = ]}
from php-auto-yasnippets.
@kostajh Thanks for the information. I'll see if I can replicate the problem on my end and (assuming I get the same issue) see if I can figure out a solution.
from php-auto-yasnippets.
Getting same error: tried ((php-mode . ((php-auto-yasnippet-required-files (list "~/project/vendor/autoload.php")))))
and ((php-mode . ((php-auto-yasnippet-required-files . (list "~/project/vendor/autoload.php")))))
. No luck
from php-auto-yasnippets.
Hey, as the original author of the support for user-defined functions, I noticed the latest notification for this thread, and thought I'd see what's up.
It's been years since I actively used this library (not writing PHP these days), but I did discover the root issue here is that somehow, I submitted bogus instructions on setting .dir-locals.el
.
To call functions in .dir-locals.el
, you have to use the magic eval
pseudo-variable.
Something like this should work a lot better:
((php-mode . ((eval . (setq-local php-auto-yasnippet-required-files
(list "~/project/vendor/autoload.php"))))))
and someone should update the example in the docs accordingly.
I haven't actually tested this - just verified that the code I pasted above does set the var correctly.
Hopefully this is some help.
from php-auto-yasnippets.
I think there was a problem with an invalid required filepath resulting in messed up hash tables.
The latest commit should fix this. (I'm not quite sure how, but it seems to have fixed it for me, something about errors not being handled properly?).
((php-mode . ((eval . (setq-local php-auto-yasnippet-required-files
(list "~/project/vendor/autoload.php"))))))
works for me
from php-auto-yasnippets.
Related Issues (10)
- Need help debugging HOT 11
- integration with auto-complete HOT 10
- Add support for end-user code? [idea] HOT 6
- support ~ for php-auto-yasnippet-php-program HOT 4
- yas--all-parents: Lisp nesting exceeds `max-lisp-eval-depth' HOT 3
- Searching for program: no such file or directory, /usr/bin/php HOT 1
- Error with payas/ac-setup HOT 1
- `Wrong type argument: stringp, nil` while in class method HOT 8
- Restrict payas/remove-extra-whitespace to PHP 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 php-auto-yasnippets.