Skip to content

Commit dcb5e9e

Browse files
committed
Set settings_path to detect config file.
1 parent 7b5e972 commit dcb5e9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pylsp_isort/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import os
23
from pathlib import Path
34
from typing import Any, Dict, Generator, TypedDict
45

@@ -26,8 +27,6 @@ def pylsp_settings() -> Dict[str, Any]:
2627
"plugins": {
2728
"isort": {
2829
"enabled": True,
29-
"profile": None,
30-
"line_length": 79,
3130
},
3231
},
3332
}
@@ -65,6 +64,7 @@ def _process(outcome, config: Config, document: Document, range: Range):
6564
for key, value in settings.items():
6665
if key in defined_args:
6766
config_kwargs[key] = value
67+
config_kwargs["settings_path"] = os.path.dirname(os.path.abspath(document.path))
6868
logger.debug("config_kwargs=%r", config_kwargs)
6969

7070
new_text = isort.code(

0 commit comments

Comments
 (0)