Skip to content

Commit 2f16781

Browse files
committed
fix: Add file.eol configuration
1 parent 0fc9682 commit 2f16781

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/configuration/files.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const configurationRegistry = monaco.extra.Registry.as<monaco.extra.IConfigurati
33

44
/**
55
* comes from https://github.com/microsoft/vscode/blob/16d0a319b28caa4b6cf4e6801fd508282b7533e0/src/vs/workbench/contrib/files/browser/files.contribution.ts#L132
6-
* Required by the Lua language server
6+
* files.exclude and files.associations are required by the Lua language server
77
*/
88
export const FILES_EXCLUDE_CONFIG = 'files.exclude'
99
export const FILES_ASSOCIATIONS_CONFIG = 'files.associations'
@@ -18,6 +18,22 @@ configurationRegistry.registerConfiguration({
1818
title: 'Files',
1919
type: 'object',
2020
properties: {
21+
'files.eol': {
22+
type: 'string',
23+
enum: [
24+
'\n',
25+
'\r\n',
26+
'auto'
27+
],
28+
enumDescriptions: [
29+
nls.localize('eol.LF', 'LF'),
30+
nls.localize('eol.CRLF', 'CRLF'),
31+
nls.localize('eol.auto', 'Uses operating system specific end of line character.')
32+
],
33+
default: 'auto',
34+
description: nls.localize('eol', 'The default end of line character.'),
35+
scope: ConfigurationScope.LANGUAGE_OVERRIDABLE
36+
},
2137
[FILES_EXCLUDE_CONFIG]: {
2238
type: 'object',
2339
markdownDescription: nls.localize('exclude', 'Configure glob patterns for excluding files and folders. For example, the file Explorer decides which files and folders to show or hide based on this setting. Refer to the `#search.exclude#` setting to define search specific excludes. Read more about glob patterns [here](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options).'),

0 commit comments

Comments
 (0)