Skip to content

Commit 7fd9c94

Browse files
committed
merge elixirlsp package
1 parent e082e3f commit 7fd9c94

File tree

4 files changed

+56
-18
lines changed

4 files changed

+56
-18
lines changed

packages/completer/src/widget.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { defaultSanitizer } from '@jupyterlab/apputils';
55
import { CodeEditor } from '@jupyterlab/codeeditor';
66
import { renderText } from '@jupyterlab/rendermime';
7-
import { HoverBox, LabIcon } from '@jupyterlab/ui-components';
7+
import { codeCheckIcon, HoverBox, LabIcon } from '@jupyterlab/ui-components';
88
import { IIterator, IterableOrArrayLike, toArray } from '@lumino/algorithm';
99
import { JSONExt, JSONObject } from '@lumino/coreutils';
1010
import { IDisposable } from '@lumino/disposable';
@@ -324,6 +324,17 @@ export class Completer extends Widget {
324324
ul.appendChild(li);
325325
}
326326
node.appendChild(ul);
327+
328+
// Add elixir-lsp logo & tip
329+
let logoDiv = document.createElement('div');
330+
logoDiv.className = 'jp-Completer-footer';
331+
logoDiv.innerHTML = codeCheckIcon.svgstr;
332+
let logoTip = document.createElement('span');
333+
logoTip.innerText = 'Powered by ElixirLsp';
334+
logoTip.className = 'jp-Completer-footer-tip';
335+
logoDiv.appendChild(logoTip);
336+
node.appendChild(logoDiv);
337+
327338
return node;
328339
}
329340

packages/completer/style/base.css

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
box-shadow: var(--jp-elevation-z6);
1616
background: var(--jp-layout-color1);
1717
color: var(--jp-content-font-color1);
18+
1819
/*border: var(--jp-border-width) solid var(--jp-border-color1);*/
1920
padding: 4px;
2021
display: flex;
@@ -41,8 +42,20 @@
4142
white-space: pre-wrap;
4243
}
4344

45+
.jp-Completer-footer {
46+
position: absolute;
47+
bottom: 4px;
48+
padding-left: 12px;
49+
}
50+
51+
.jp-Completer-footer-tip {
52+
color: #bcbcbc;
53+
font-size: 10px;
54+
margin-left: 4px;
55+
}
56+
4457
.jp-Completer-list {
45-
margin: 0;
58+
margin: 0 0 24px;
4659
padding: 0;
4760
list-style-type: none;
4861
overflow-y: scroll;
@@ -127,8 +140,10 @@
127140
}
128141

129142
.jp-Completer-item.jp-mod-active {
130-
background: var(--jp-brand-color1);
131-
color: white;
143+
color: var(--jp-brand-color1);
144+
font-weight: bold;
145+
146+
/*color: white;*/
132147
}
133148

134149
.jp-Completer-item .jp-Completer-match mark {
@@ -142,43 +157,43 @@
142157
}
143158

144159
.jp-Completer-type[data-color-index='1'] {
145-
background: #1f77b4;
160+
color: #1f77b4;
146161
}
147162

148163
.jp-Completer-type[data-color-index='2'] {
149-
background: #ff7f0e;
164+
color: #ff7f0e;
150165
}
151166

152167
.jp-Completer-type[data-color-index='3'] {
153-
background: #2ca02c;
168+
color: #2ca02c;
154169
}
155170

156171
.jp-Completer-type[data-color-index='4'] {
157-
background: #d62728;
172+
color: #d62728;
158173
}
159174

160175
.jp-Completer-type[data-color-index='5'] {
161-
background: #9467bd;
176+
color: #9467bd;
162177
}
163178

164179
.jp-Completer-type[data-color-index='6'] {
165-
background: #8c564b;
180+
color: #8c564b;
166181
}
167182

168183
.jp-Completer-type[data-color-index='7'] {
169-
background: #e377c2;
184+
color: #e377c2;
170185
}
171186

172187
.jp-Completer-type[data-color-index='8'] {
173-
background: #7f7f7f;
188+
color: #7f7f7f;
174189
}
175190

176191
.jp-Completer-type[data-color-index='9'] {
177-
background: #bcbd22;
192+
color: #bcbd22;
178193
}
179194

180195
.jp-Completer-type[data-color-index='10'] {
181-
background: #17becf;
196+
color: #17becf;
182197
}
183198

184199
.jp-Completer-loading-bar-container {
Lines changed: 15 additions & 4 deletions
Loading

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ dependencies = [
4040
"ipykernel",
4141
"jinja2>=3.0.3",
4242
"jupyter_core",
43+
"elixir-lsp>=1.5.1",
4344
"jupyter_server_ydoc>=0.1.9,<0.2.0",
4445
"elixirlab-server>=2.16.5",
4546
"elixir-shim>=0.2.2",

0 commit comments

Comments
 (0)