CudaText-addons / cuda_lsp

LSP Client plugin for CudaText
2 stars 3 forks source link

AttributeError: 'Range' object has no attribute 'get' #182

Closed KDBal closed 1 year ago

KDBal commented 1 year ago

После обновления плагина при запуске получаю такую ошибку в консоли (внутри cudatext):

ERROR: QueuesProcessingError: LSP: C, C++ - 'Range' object has no attribute 'get' Traceback (most recent call last): File "C:\Users\balkd\AppData\Local\cudatext\py\cuda_lsp\language.py", line 429, in process_queues self._on_lsp_msg(msg) File "C:\Users\balkd\AppData\Local\cudatext\py\cuda_lsp\language.py", line 549, in _on_lsp_msg self.treeman.fill_tree(msg.result) File "C:\Users\balkd\AppData\Local\cudatext\py\cuda_lsp\tree.py", line 81, in fill_tree self._fill_from_tree(items) File "C:\Users\balkd\AppData\Local\cudatext\py\cuda_lsp\tree.py", line 109, in _fill_from_tree fill_tree_item(item) File "C:\Users\balkd\AppData\Local\cudatext\py\cuda_lsp\tree.py", line 94, in fill_tree_item item_id = self.add_tree_item(h_tree, item.name, parent_id=parent_id, kind=item.kind, File "C:\Users\balkd\AppData\Local\cudatext\py\cuda_lsp\tree.py", line 160, in add_tree_item range = EditorDoc.range2carets(range) File "C:\Users\balkd\AppData\Local\cudatext\py\cuda_lsp\book.py", line 239, in range2carets return (range.get('start')['character'], AttributeError: 'Range' object has no attribute 'get'

Если вернуть старую версию range2carets, то всё работает нормально.

Cudatext 1.195.0.5 cuda_lsp 2023.05.22 Windows 11

veksha commented 1 year ago

да, вижу ошибку с "enable_code_tree": true, временно поставьте false

veksha commented 1 year ago

@Alexey-T see PR https://github.com/CudaText-addons/cuda_lsp/pull/183