Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
cognitive-complexity-threshold = 20

[[disallowed-methods]]
path = "tree_sitter::Node::named_child"

[[disallowed-methods]]
path = "tree_sitter::Node::next_named_sibling"
replacement = "odoo_lsp::utils::python_next_named_sibling"

[[await-holding-invalid-types]]
path = "dashmap::mapref::one::RefMut"
reason = "Would deadlock if same thread wants to acquire a reference"
Expand Down
164 changes: 156 additions & 8 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "${workspaceRoot}/examples"],
"outFiles": ["${workspaceRoot}/dist/*.js"],
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"${workspaceRoot}/examples"
],
"outFiles": [
"${workspaceRoot}/dist/*.js"
],
"preLaunchTask": "watch-all",
"env": {
"SERVER_PATH": "${workspaceRoot}/target/debug/odoo-lsp",
Expand All @@ -21,8 +26,13 @@
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "${workspaceRoot}/examples"],
"outFiles": ["${workspaceRoot}/dist/*.js"],
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"${workspaceRoot}/examples"
],
"outFiles": [
"${workspaceRoot}/dist/*.js"
],
"preLaunchTask": {
"type": "npm",
"script": "watch"
Expand All @@ -38,7 +48,9 @@
"name": "Attach",
"program": "${workspaceFolder}/target/debug/odoo-lsp",
// "pid": "${command:pickMyProcess}",
"sourceLanguages": ["rust"],
"sourceLanguages": [
"rust"
],
"windows": {
"program": "${workspaceFolder}/target/debug/odoo-lsp.exe"
}
Expand All @@ -53,13 +65,149 @@
"--extensionTestsPath=${workspaceRoot}/client/out/test/index",
"${workspaceRoot}/client/testFixture"
],
"outFiles": ["${workspaceRoot}/client/out/test/**/*.js"]
"outFiles": [
"${workspaceRoot}/client/out/test/**/*.js"
]
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'odoo_lsp'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=odoo-lsp"
],
"filter": {
"name": "odoo_lsp",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'odoo-lsp'",
"cargo": {
"args": [
"build",
"--bin=odoo-lsp",
"--package=odoo-lsp"
],
"filter": {
"name": "odoo-lsp",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'odoo-lsp'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=odoo-lsp",
"--package=odoo-lsp"
],
"filter": {
"name": "odoo-lsp",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'odoo_lsp_tests'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=odoo-lsp-tests"
],
"filter": {
"name": "odoo_lsp_tests",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug benchmark 'standard'",
"cargo": {
"args": [
"test",
"--no-run",
"--bench=standard",
"--package=odoo-lsp-tests"
],
"filter": {
"name": "standard",
"kind": "bench"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'ts-indent'",
"cargo": {
"args": [
"build",
"--bin=ts-indent",
"--package=ts-indent"
],
"filter": {
"name": "ts-indent",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'ts-indent'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=ts-indent",
"--package=ts-indent"
],
"filter": {
"name": "ts-indent",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
],
"compounds": [
{
"name": "Client + Server",
"configurations": ["Launch Client", "Attach"]
"configurations": [
"Launch Client",
"Attach"
]
}
]
}
}
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"lldb.displayFormat": "auto",
"lldb.dereferencePointers": true,
"lldb.consoleMode": "commands"
}
Loading
Loading