Skip to content

Commit cb40865

Browse files
committed
feat: pug configuration
1 parent 23d3291 commit cb40865

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@
264264
"command": "nuxtr.configureLinters",
265265
"when": "nuxtr.isNuxtProject"
266266
},
267+
{
268+
"command": "nuxtr.configurePug",
269+
"when": "nuxtr.isNuxtProject"
270+
},
267271
{
268272
"command": "nuxtr.directToggleDevTools",
269273
"when": "nuxtr.isNuxtProject"
@@ -872,6 +876,12 @@
872876
"category": "Nuxtr",
873877
"when": "nuxtr.isNuxtProject"
874878
},
879+
{
880+
"command": "nuxtr.configurePug",
881+
"title": "Configure Pug",
882+
"category": "Nuxtr",
883+
"when": "nuxtr.isNuxtProject"
884+
},
875885
{
876886
"command": "nuxtr.createPageTemplate",
877887
"title": "Create Vue Page Template",

src/commands/Templates.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ export enum PugConfigurationSteps {
1010
addPluginToTSConfig = 'Add @vue/language-plugin-pug to tsconfig.json',
1111
}
1212

13+
const defaultOptions = Object.values(PugConfigurationSteps)
1314

14-
export const configurePug = (options: string[]) => {
15+
16+
export const configurePug = (options: string[] = defaultOptions) => {
1517
try {
1618
window
1719
.showQuickPick(options, {

src/extension.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const commandList = [
3939
{ command: 'nuxtr.openSettings', function: nuxtrCommands.openSettings },
4040
{ command: 'nuxtr.configureCSS', function: nuxtrCommands.configureCSS },
4141
{ command: 'nuxtr.configureLinters', function: nuxtrCommands.configureLinters },
42+
{ command: 'nuxtr.configurePug', function: nuxtrCommands.configurePug },
4243
{ command: 'nuxtr.createPageTemplate', function: nuxtrCommands.createPageTemplate },
4344
{ command: 'nuxtr.createLayoutTemplate', function: nuxtrCommands.createLayoutTemplate },
4445
{ command: 'nuxtr.createEmptyFileTemplate', function: nuxtrCommands.createEmptyFileTemplate },

src/intellisense/completionProviders/nuxtIgnore.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ export class NuxtIgnoreCompletionProvider implements vscode.CompletionItemProvid
6464
}
6565

6666
private getSubDirectories(directory: string): string[] {
67-
console.log('getSubDirectories', directory);
6867
directory = directory.replace(/!/g, '');
69-
console.log('getSubDirectories', directory);
7068

7169
try {
7270
if (fs.existsSync(directory)) {

src/watchers/config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const watcherDefaultBehavior = false
1212
const dependencies = getProjectDependencies() as unknown as Array<string>;
1313

1414
export const snippetsConfigWatcher: Disposable = createConfigWatcher('nuxtr.snippets', async () => {
15-
console.log('snippets', getConfiguration().snippets);
1615
await toggleSnippets()
1716
return Promise.resolve();
1817
});

0 commit comments

Comments
 (0)