summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-30 10:17:42 -0500
committerpommicket <pommicket@gmail.com>2022-12-30 10:17:42 -0500
commit61db5a1a07f4fbe953d7cab9b6714fe5157a1265 (patch)
treeb06e2590429dcd108bcd00182fbb09cd250a0d38 /buffer.c
parenta0f8332da674d452f7ae4f84f01d4682d464c9b2 (diff)
start workspace/symbol
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/buffer.c b/buffer.c
index 679da65..8079bf5 100644
--- a/buffer.c
+++ b/buffer.c
@@ -314,6 +314,8 @@ static void buffer_send_lsp_did_open(TextBuffer *buffer, LSP *lsp, char *buffer_
LSP *buffer_lsp(TextBuffer *buffer) {
if (!buffer_is_named_file(buffer))
return NULL;
+ if (buffer->view_only)
+ return NULL; // we don't really want to start up an LSP in /usr/include
LSP *true_lsp = ted_get_lsp(buffer->ted, buffer->filename, buffer_language(buffer));
LSP *curr_lsp = ted_get_lsp_by_id(buffer->ted, buffer->lsp_opened_in);
if (true_lsp != curr_lsp) {