Skip to content

Commit bee5c01

Browse files
committed
fix: allow LSP filename matching when extension is missing
Fall back to the filename when no extension is present so servers can target files like 'Dockerfile'. Fixes #2182.
1 parent 080fce9 commit bee5c01

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/opencode/src/lsp/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export namespace LSP {
113113

114114
async function getClients(file: string) {
115115
const s = await state()
116-
const extension = path.parse(file).ext
116+
const extension = path.parse(file).ext || file
117117
const result: LSPClient.Info[] = []
118118
for (const server of Object.values(s.servers)) {
119119
if (server.extensions.length && !server.extensions.includes(extension)) continue

0 commit comments

Comments
 (0)