This package provides the following services:
JSP Autocomplete package
This Atom package adds autocompletion support for JSP with focus on it's subset JSPX. Uses the autocomplete-plus package.
Features
Autocompletion for implicit objects
Autocompletion for EL keywords
Autocompletion for variables defined in tags
<jsp:useBean>
tags
Autocompletion for variables from .tld
files
Autocompletion of tag functions from See setup for an explanation how to get autocompletion based on .tld
files to work.
Abbreviations
.tld
files
Autocompletion for tags from .tld
files
Autocompletion for attributes from scope
, var
)
Autocompletion for attributes values (
Follows include directives to find taglib declarations
To find all taglib declarations the package crawls the file system by following include directives.
Goals
- EL autocompletion for properties
What this package won't do
- Autocomplete embedded Java code
Config
tldSources
: array of directories containing tld files
Setup
- Install this package
apm install autocomplete-jsp
- Set the configuration
autocomplete-jsp.tldSources
to a directory of your choice, for example~/tlds
and make sure this directory exist.
mkdir ~/tlds
- Make sure all JSTL TLDs are in this directory
cd ~/tlds
wget https://raw.githubusercontent.com/javaee/jstl-api/master/impl/src/main/resources/META-INF/c.tld
wget https://raw.githubusercontent.com/javaee/jstl-api/master/impl/src/main/resources/META-INF/fmt.tld
wget https://raw.githubusercontent.com/javaee/jstl-api/master/impl/src/main/resources/META-INF/fn.tld
wget https://raw.githubusercontent.com/javaee/jstl-api/master/impl/src/main/resources/META-INF/sql.tld
wget https://raw.githubusercontent.com/javaee/jstl-api/master/impl/src/main/resources/META-INF/x.tld
- Copy all of your custom
.tld
files into this directory
cp ~/workspace/someProject/src/main/resources/WEB-INF/*.tld ~/tlds
# or perhaps even
cp ~/workspace/*/src/**.tld ~/tlds/
License
This project is licensed under the terms of the MIT license. A copy of the license can be found in the root directory of the project in the file LICENSE.md.