Skip to content

Commit 8d50a78

Browse files
committed
Initial commit
0 parents  commit 8d50a78

File tree

6 files changed

+1467
-0
lines changed

6 files changed

+1467
-0
lines changed

.eslintrc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
extends: airbnb-base
2+
3+
rules:
4+
import/no-extraneous-dependencies: "off"
5+

.gitignore

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
2+
# Created by https://www.gitignore.io/api/node
3+
# Edit at https://www.gitignore.io/?templates=node
4+
5+
### Node ###
6+
# Logs
7+
logs
8+
*.log
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
lerna-debug.log*
13+
14+
# Diagnostic reports (https://nodejs.org/api/report.html)
15+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
16+
17+
# Runtime data
18+
pids
19+
*.pid
20+
*.seed
21+
*.pid.lock
22+
23+
# Directory for instrumented libs generated by jscoverage/JSCover
24+
lib-cov
25+
26+
# Coverage directory used by tools like istanbul
27+
coverage
28+
29+
# nyc test coverage
30+
.nyc_output
31+
32+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
33+
.grunt
34+
35+
# Bower dependency directory (https://bower.io/)
36+
bower_components
37+
38+
# node-waf configuration
39+
.lock-wscript
40+
41+
# Compiled binary addons (https://nodejs.org/api/addons.html)
42+
build/Release
43+
44+
# Dependency directories
45+
node_modules/
46+
jspm_packages/
47+
48+
# TypeScript v1 declaration files
49+
typings/
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional REPL history
58+
.node_repl_history
59+
60+
# Output of 'npm pack'
61+
*.tgz
62+
63+
# Yarn Integrity file
64+
.yarn-integrity
65+
66+
# dotenv environment variables file
67+
.env
68+
.env.test
69+
70+
# parcel-bundler cache (https://parceljs.org/)
71+
.cache
72+
73+
# next.js build output
74+
.next
75+
76+
# nuxt.js build output
77+
.nuxt
78+
79+
# vuepress build output
80+
.vuepress/dist
81+
82+
# Serverless directories
83+
.serverless/
84+
85+
# FuseBox cache
86+
.fusebox/
87+
88+
# DynamoDB Local files
89+
.dynamodb/
90+
91+
lib/
92+
# End of https://www.gitignore.io/api/node

.prettierrc.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
printWidth: 120
2+
tabWidth: 2
3+
semi: true
4+
singleQuote: true
5+
trailingComma: all
6+
bracketSpacing: true
7+
endOfLine: lf
8+
arrowParens: always
9+

package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "coc-elixir",
3+
"version": "0.1.0",
4+
"description": "coc.nvim elixir extension",
5+
"main": "lib/index.js",
6+
"scripts": {},
7+
"engines": {
8+
"coc": "^0.0.4"
9+
},
10+
"author": "",
11+
"license": "MIT",
12+
"dependencies": {},
13+
"devDependencies": {
14+
"coc.nvim": "^0.0.71",
15+
"eslint": "^5.3.0",
16+
"eslint-config-airbnb-base": "^13.1.0",
17+
"eslint-plugin-import": "^2.18.0"
18+
}
19+
}

src/index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { LanguageClient, workspace, services } from 'coc.nvim';
2+
3+
exports.activate = (context) => {
4+
const config = workspace.getConfiguration().get('elixir', {});
5+
6+
const serverOptions = {
7+
command: config.pathToEls,
8+
};
9+
10+
const clientOptions = {
11+
documentSelector: [{ language: 'elixir', scheme: 'file' }, { language: 'elixir', scheme: 'untitled' }],
12+
};
13+
14+
const languageClient = new LanguageClient('elixir', 'elixir', serverOptions, clientOptions);
15+
16+
context.subscriptions.push(
17+
services.registLanguageClient(languageClient),
18+
);
19+
};

0 commit comments

Comments
 (0)