2020-05-07 02:23:37 +02:00
|
|
|
{
|
2023-04-07 22:56:10 +02:00
|
|
|
/**
|
|
|
|
* Linting & (Auto)formatting
|
|
|
|
*/
|
|
|
|
|
2020-05-07 02:23:37 +02:00
|
|
|
"prettier.semi": false,
|
|
|
|
"prettier.tabWidth": 2,
|
|
|
|
"prettier.singleQuote": true,
|
|
|
|
"prettier.arrowParens": "avoid",
|
2021-12-31 15:43:27 +01:00
|
|
|
"prettier.printWidth": 120,
|
2023-04-07 22:56:10 +02:00
|
|
|
"eslint.format.enable": true,
|
2020-05-07 02:23:37 +02:00
|
|
|
"coc.preferences.formatOnType": true,
|
2023-04-07 22:56:10 +02:00
|
|
|
"coc.preferences.formatOnSave": true,
|
|
|
|
|
2023-04-07 22:57:41 +02:00
|
|
|
// Markdown
|
|
|
|
"markdownlint.config": {
|
|
|
|
"heading-style": {
|
|
|
|
"style": "atx"
|
|
|
|
},
|
|
|
|
"ul-style": {
|
|
|
|
"style": "asterisk"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Language server & diagnostics
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Language server
|
2021-12-31 15:43:27 +01:00
|
|
|
"languageserver": {
|
2022-09-24 11:28:19 +02:00
|
|
|
// "racket": {
|
|
|
|
// "command": "racket",
|
|
|
|
// "args": ["--lib", "racket-langserver"],
|
|
|
|
// "filetypes": ["scheme", "racket"]
|
|
|
|
// }
|
|
|
|
"bash": {
|
|
|
|
"command": "bash-language-server",
|
|
|
|
"args": ["start"],
|
|
|
|
"filetypes": ["sh"]
|
|
|
|
},
|
|
|
|
"dockerfile": {
|
|
|
|
"command": "docker-langserver",
|
|
|
|
"args": ["--stdio"],
|
|
|
|
"filetypes": ["dockerfile"]
|
|
|
|
},
|
|
|
|
"haskell": {
|
|
|
|
"command": "haskell-language-server-wrapper",
|
|
|
|
"args": ["--lsp"],
|
|
|
|
"rootPatterns": ["*.cabal", "stack.yaml", "cabal.project", "package.yaml", "hie.yaml"],
|
|
|
|
"filetypes": ["haskell", "lhaskell"],
|
|
|
|
"settings": {
|
|
|
|
"haskell": {
|
|
|
|
"formattingProvider": "stylish-haskell"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Run `haskell-language-server-wrapper generate-default-config` for a defult config
|
|
|
|
// "settings": { ... }
|
|
|
|
},
|
|
|
|
"R": {
|
2023-04-07 22:57:41 +02:00
|
|
|
"enable": true,
|
|
|
|
"command": "/usr/bin/R",
|
|
|
|
"args": ["--slave", "-e", "languageserver::run()"],
|
|
|
|
"filetypes": ["r"]
|
|
|
|
},
|
|
|
|
"prolog-lsp": {
|
|
|
|
"command": "swipl",
|
|
|
|
"args": ["-g", "use_module(library(lsp_server)).", "-g", "lsp_server:main", "-t", "halt", "--", "stdio"],
|
|
|
|
"filetypes": ["prolog"]
|
2021-12-31 15:43:27 +01:00
|
|
|
}
|
|
|
|
},
|
2023-04-07 22:57:41 +02:00
|
|
|
"jedi.workspace.extraPaths": [
|
|
|
|
"/home/h/.local/lib/python3.8/site-packages",
|
|
|
|
"/home/h/.local/lib/python3.9/site-packages",
|
|
|
|
"/home/h/.local/lib/python3.10/site-packages",
|
|
|
|
"/home/h/.conda/envs/ml-2223/lib/python3.10/site-packages",
|
|
|
|
"/home/h/.conda/envs/nlp-2223/lib/python3.10/site-packages"
|
|
|
|
],
|
|
|
|
|
|
|
|
// Diagnostics
|
2022-09-24 11:30:02 +02:00
|
|
|
"diagnostic.infoSign": "🛈",
|
2023-04-07 22:57:41 +02:00
|
|
|
"diagnostic-languageserver.filetypes": {
|
|
|
|
"python": "pylint",
|
|
|
|
"systemd": "systemd-analyze"
|
|
|
|
},
|
|
|
|
"diagnostic-languageserver.linters": {
|
|
|
|
"pylint": {
|
|
|
|
"sourceName": "pylint",
|
|
|
|
"command": "pylint",
|
|
|
|
"debounce": 100,
|
|
|
|
"args": [
|
|
|
|
"--output-format",
|
|
|
|
"text",
|
|
|
|
"--score",
|
|
|
|
"no",
|
|
|
|
"--msg-template",
|
|
|
|
"'{line}:{column}:{category}:{msg} ({msg_id}:{symbol})'",
|
|
|
|
"%file"
|
|
|
|
],
|
|
|
|
"formatPattern": [
|
|
|
|
"^(\\d+?):(\\d+?):([a-z]+?):(.*)$",
|
|
|
|
{
|
|
|
|
"line": 1,
|
|
|
|
"column": 2,
|
|
|
|
"endColumn": 2,
|
|
|
|
"security": 3,
|
|
|
|
"message": 4
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"rootPatterns": ["pyproject.toml", "setup.py", ".git"],
|
|
|
|
"securities": {
|
|
|
|
"informational": "hint",
|
|
|
|
"refactor": "info",
|
|
|
|
"convention": "info",
|
|
|
|
"warning": "warning",
|
|
|
|
"error": "error",
|
|
|
|
"fatal": "error"
|
|
|
|
},
|
|
|
|
"offsetColumn": 1,
|
|
|
|
"offsetColumnEnd": 1,
|
|
|
|
"formatLines": 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
// Set up autopep8
|
|
|
|
"diagnostic-languageserver.formatters": {
|
|
|
|
"autopep8": {
|
|
|
|
"command": "autopep8",
|
|
|
|
"args": ["-"]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"diagnostic-languageserver.formatFiletypes": {
|
|
|
|
"python": "autopep8"
|
|
|
|
},
|
|
|
|
|
2023-04-07 22:58:07 +02:00
|
|
|
/**
|
|
|
|
* Autocompletion, suggestions, snippets
|
|
|
|
*/
|
|
|
|
|
2021-12-31 15:43:27 +01:00
|
|
|
"suggest.autoTrigger": "trigger",
|
2023-04-07 22:58:07 +02:00
|
|
|
"suggest.snippetIndicator": "▸",
|
|
|
|
"signature.target": "float",
|
|
|
|
"snippets.userSnippetsDirectory": "~/.vim/snips/",
|
|
|
|
"coc.source.file.triggerCharacters": ["/"],
|
|
|
|
|
|
|
|
// ECMAScript, TypeScript
|
2020-05-13 19:10:30 +02:00
|
|
|
"emmet.includeLanguages": { "javascript": "javascriptreact" },
|
2021-12-31 15:43:27 +01:00
|
|
|
"javascript.suggestionActions.enabled": true,
|
|
|
|
"typescript.suggestionActions.enabled": true,
|
|
|
|
"svelte.plugin.typescript.diagnostics.enable": true,
|
2023-04-07 22:58:07 +02:00
|
|
|
"svelte.enable-ts-plugin": true,
|
|
|
|
|
2023-03-12 13:09:45 +01:00
|
|
|
// Add BibTex file for coc-bibtex autocompletion
|
|
|
|
"list.source.bibtex.files": ["~/.wiki/references.bib", "./*.bib"],
|
|
|
|
"bibtex.silent": true,
|
2023-04-07 22:57:41 +02:00
|
|
|
|
|
|
|
// Adjust floating menus
|
|
|
|
"hover.floatConfig": {
|
|
|
|
"border": true,
|
|
|
|
"highlight": "Normal"
|
|
|
|
},
|
|
|
|
"signature.floatConfig": {
|
|
|
|
"border": true,
|
|
|
|
"highlight": "Normal"
|
|
|
|
},
|
|
|
|
"diagnostic.floatConfig": {
|
|
|
|
"border": true,
|
|
|
|
"highlight": "Normal"
|
|
|
|
},
|
|
|
|
"suggest.pumFloatConfig": {
|
|
|
|
"border": true,
|
|
|
|
"highlight": "Normal"
|
|
|
|
},
|
|
|
|
|
2020-05-07 02:23:37 +02:00
|
|
|
}
|