Comments (13)
Could you explain more your need?
Perhaps you should see https://github.com/angelozerr/CodeMirror-XQuery/blob/master/codemirror-javascript/addon/hint/tern/tern-extension.js (CodeMirror.ternHint = function(cm, c) {
function c1(data) { => line 43), I have extended the éofficial" CodeMirror tern addon to add "templates" hint.
from codemirror-xquery.
I am actually working on a project and we have created a JS editor which provides auto completion. So i have used your add ons. But on using this add on it displays only JavaScript functions in autocompletion. Since my project contains many infra files also and i need to show functions of that infra files through autocompletion feature.
So how can i achieve that?
P.S i need autocompletion with method parameters too..
from codemirror-xquery.
To add your own completion with tern, the best mean is to create defs file like I have done here https://github.com/angelozerr/CodeMirror-XQuery/tree/master/codemirror-javascript/addon/hint/tern/defs
But perhaps you wish to use directly your js file and your file should be added to tern server (I must modify my addon to do that).
For parameter completion, I would like to manage that too (eg: show only number vars after str.slice(
but I must study if it's possible with tern.
from codemirror-xquery.
If i have multiple functions in multiple Js files then what can i do?
Can i simply directly declare all these function signature in a global array and with tern it could automatically detect all the functions with method parameters.
Can you provide code of this?
from codemirror-xquery.
Creating your own Tern def (see https://github.com/angelozerr/CodeMirror-XQuery/tree/master/codemirror-javascript/addon/hint/tern/defs ) could help you no?
from codemirror-xquery.
So i will have to write my own def but seems a quite lengthy process to declare all the functions..
Is there any way by which i could import the Js files and the code could automatically detect all the functions inside that Js File.
from codemirror-xquery.
I'm not a big expert with Tern, but I think you could define use getFile function to add your own JS file. Never played with that.
from codemirror-xquery.
Can you provide the function through which we can import JS files directly.
from codemirror-xquery.
I suggest you to post your question on CodeMirror forum.
from codemirror-xquery.
@ayush-jayaswal Tern demo uses something like server.addFile and Tern demo shows completion for custom function as you may seen in Tern demo
from codemirror-xquery.
How do i configure tern server to include user-defined .js files so as to provide method auto complete.
from codemirror-xquery.
As I said you, I suggest you to post your question on CodeMirror forum.
from codemirror-xquery.
Any chance to re-open this requirement?
from codemirror-xquery.
Related Issues (12)
- Support of documentation popup for methods HOT 4
- Using template-hint.js with current CodeMirror?
- Parse errors HOT 2
- hyperlink with ctl+click in Firefox 35
- Online demo down HOT 3
- text-hover.js / scroll down main window error
- HTML Autocomplete
- Support of snippets in autocomplete HOT 3
- Split generic addons and mode addon in several folder HOT 1
- autocomplete for property values? HOT 1
- Templates plugin - end template editing mode when user presses Ender or Tab on last var HOT 5
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 codemirror-xquery.