This repository was archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Language Server Protocol Support for Brackets #14606
Merged
Merged
Changes from 82 commits
Commits
Show all changes
187 commits
Select commit
Hold shift + click to select a range
2bfb400
LSP Initial set of changes
ac24b4c
Adding comments and a bit of cleanup
0a585d5
Adding php client for lsp
58bdca0
further cleanup
908af27
removing dependency on HintUtils
1d9a45f
removing phpClient extension from this branch
27592bd
Cleanup
fb1a9fc
fixing eslint errors
95d2db2
Refactoring code- Removing dependency on JSUtils ANd adding basic str…
1639d42
Bug Fix: too many listeners were getting attached to node process + c…
c577588
putting null check and settign capabilities to default values
9c133bc
reinitializing server on workspace change and moving out capabilities…
32772c0
cleanup
b9d747e
First cut for LSP support in Brackets
shubhsnov 0a73384
First cut for LSP support in Brackets
3fe4fb7
Adding client infrastructure
shubhsnov 4355925
Adding client infrastructure
03bfd7e
Adding handlers on Language Client Proxy, fixing eslint errors
shubhsnov 45377bf
Adding handlers on Language Client Proxy, fixing eslint errors
a2ad0a5
Fixing protocol adapter
shubhsnov a86ceab
Fixing protocol adapter
a300e1b
Fix typo
shubhsnov 10e5e93
Fix typo
0018109
Merge branch 'shubham/LanguageTools' into subhash/brackets/master
shubhsnov e4bb9ac
Merge branch 'shubham/LanguageTools' into subhash/brackets/master
d156822
Removing older implementation
shubhsnov 29474b1
Removing older implementation
7d1ec5b
Added error checks to the auto update mechanism. So in case the auto …
nethip bd62861
First cut for LSP support in Brackets
shubhsnov b9e7d00
First cut for LSP support in Brackets
ad0bd33
Adding client infrastructure
shubhsnov 3104033
Adding client infrastructure
7512ebb
Adding handlers on Language Client Proxy, fixing eslint errors
shubhsnov 3620739
Adding handlers on Language Client Proxy, fixing eslint errors
490a2ad
Fixing protocol adapter
shubhsnov 746b720
Fixing protocol adapter
725dbc8
Fix typo
shubhsnov 63649cc
Fix typo
272eced
Removing older implementation
shubhsnov a2d1aeb
Removing older implementation
62f7c10
Merge pull request #1 from subhashjha333/subhashMaster
shubhsnov 24bbaa9
Merge pull request #1 from subhashjha333/subhashMaster
shubhsnov 2f37de2
Merge branch 'master' of https://github.com/subhashjha333/brackets in…
shubhsnov 4f52ba7
Merge branch 'master' of https://github.com/subhashjha333/brackets in…
bb64752
Removing custom comments
shubhsnov 30fd345
Removing custom comments
7075033
Merge pull request #2 from subhashjha333/subhashMaster
shubhsnov 4f981c7
Fixing Typo
shubhsnov fb27ddc
Fixing Typo
05ae5d6
Merge pull request #3 from subhashjha333/subhashMaster
shubhsnov 3f36ab1
Add missing Params in function call
shubhsnov 327137b
Add missing Params in function call
b448f52
Merge pull request #4 from subhashjha333/subhashMaster
shubhsnov c6b58c8
Correcting message type, handlers
shubhsnov 9f508b7
Correcting message type, handlers
380d515
Merge pull request #5 from subhashjha333/subhashMaster
shubhsnov dd3206e
Minor correction on active project change
shubhsnov 84a599c
Minor correction on active project change
fb7418c
Merge pull request #6 from subhashjha333/subhashMaster
shubhsnov 087ce19
Correcting the message format for didChange
shubhsnov 0c62ace
Correcting the message format for didChange
a0818d8
Merge pull request #7 from subhashjha333/subhashMaster
shubhsnov b494330
Changing custom notification and request handlers, correcting typo, a…
shubhsnov 6a4d45a
Changing custom notification and request handlers, correcting typo, a…
4a09923
Merge pull request #8 from subhashjha333/subhashMaster
shubhsnov 4590468
Stop Creation of Multiple Language Servers
shubhsnov 74d8a70
Stop Creation of Multiple Language Servers
1384ffe
Merge pull request #9 from subhashjha333/subhashMaster
shubhsnov 5ad71bc
Make Language Client Generic, address review comments
shubhsnov 75d5407
Make Language Client Generic, address review comments
c4e9dfe
Correcting param descriptions
shubhsnov f0a5529
Correcting param descriptions
9f90371
Merge pull request #10 from subhashjha333/subhashMaster
shubhsnov 447179d
Modifying events handling logic for Language Client, add formatting o…
shubhsnov 57fb773
Modifying events handling logic for Language Client, add formatting o…
f653a6d
Merge pull request #11 from subhashjha333/subhashMaster
shubhsnov 150da53
Add handlers for node side
shubhsnov bf1649e
Add handlers for node side
b7f47ce
Removing explicit param creation, substituting with appropriate checks
shubhsnov 203c0e1
Removing explicit param creation, substituting with appropriate checks
c1ddfb9
Fixing lint errors in MessageHandler.js
shubhsnov 88bdb2e
Fixing lint errors in MessageHandler.js
6184758
Merge pull request #12 from subhashjha333/subhashMaster
shubhsnov 34684e1
Messaging related cleanup
shubhsnov 3fcb2d7
Messaging related cleanup
7931b7f
Adding default providers and feature managers
shubhsnov 5a842f0
Adding default providers and feature managers
d199455
Adding banner and fixing lint error
shubhsnov c802d19
Adding banner and fixing lint error
822cc83
fix spacing issue
shubhsnov 202cb66
fix spacing issue
ad8316b
Merge pull request #13 from subhashjha333/subhashMaster
shubhsnov 65c57fc
Fix spacing issues
shubhsnov 291a4ca
Fix spacing issues
c03bd7e
Merge pull request #14 from subhashjha333/subhashMaster
shubhsnov 36349b4
Add filetype checks for all events, minor server info corrections
shubhsnov 2b8ceb5
Add filetype checks for all events, minor server info corrections
53156c9
Handling Reload with Extension Scenario, minor JumpToDef provider fix
shubhsnov b3fe8e1
Handling Reload with Extension Scenario, minor JumpToDef provider fix
9b1f78a
Merge pull request #15 from subhashjha333/subhashMaster
shubhsnov a86e973
Correcting Typo
shubhsnov 1856754
Correcting Typo
7e6076b
Merge pull request #16 from subhashjha333/subhashMaster
shubhsnov 85a95a0
Adding bug fixes
shubhsnov 1feb290
Adding bug fixes
bb511eb
Merge pull request #17 from subhashjha333/subhashMaster
shubhsnov ac6fbb2
Adding bug fixes 2
shubhsnov dd9e016
Adding bug fixes 2
0191bac
Addressing Review: Fixing minor typo
shubhsnov 1ed1843
Addressing Review: Fixing minor typo
946ef34
Merge pull request #18 from subhashjha333/subhashMaster
shubhsnov ea67c2d
Minor bug fixes, functionality enhancements
shubhsnov 5250e9c
Minor bug fixes, functionality enhancements
3f7fcd0
Adding tests for Language Server Support: first cut
shubhsnov 58fe60e
Adding tests for Language Server Support: first cut
619949b
Adding banner, fixing lint errors
shubhsnov 8eb945b
Adding banner, fixing lint errors
94c2424
Merge pull request #19 from subhashjha333/subhashMaster
shubhsnov 53d2b10
Adding dependency related tasks
shubhsnov 989845c
Adding dependency related tasks
782f62a
Fixing npm environment string
shubhsnov fafc45e
Fixing npm environment string
d108ca3
Merge pull request #20 from subhashjha333/subhashMaster
shubhsnov c7346a1
Changing handler name
shubhsnov de6392c
Changing handler name
0f6439a
Merge pull request #21 from subhashjha333/subhashMaster
shubhsnov a3bc1bd
Changing file name to ClientLoader
shubhsnov 14b0f03
Changing file name to ClientLoader
7db5da1
Merge pull request #22 from subhashjha333/subhashMaster
shubhsnov 7a0890c
Changing variable name appropriately
shubhsnov e86b6e0
Changing variable name appropriately
fa040da
Grunt related changes for build
shubhsnov 272ed31
Grunt related changes for build
840ccab
Merge pull request #23 from subhashjha333/subhashMaster
shubhsnov ef50c53
Adding additional requests and notifications for handling various sce…
shubhsnov db42893
Adding additional requests and notifications for handling various sce…
7af98cd
Merge pull request #24 from subhashjha333/subhashMaster
shubhsnov 2f5808f
Adding Path Converter Utilities
shubhsnov dfed04c
Adding Path Converter Utilities
6dfd685
Merge pull request #25 from subhashjha333/subhashMaster
shubhsnov 5c93658
Changing Ternary operator to OR operater
shubhsnov ed6d479
Changing Ternary operator to OR operater
1fa684d
Addressing review comments
shubhsnov 79bd55e
Addressing review comments
18267a0
Merge pull request #26 from subhashjha333/subhashMaster
shubhsnov be448fc
Removing the handler for editor change, will be handled explicitely
shubhsnov 54a3294
Removing the handler for editor change, will be handled explicitely
de0def7
Merge pull request #27 from subhashjha333/subhashMaster
shubhsnov 81d2c17
Patching JavaScriptCodeHints
shubhsnov ccd6cc8
Patching JavaScriptCodeHints
65960d4
Preferences infra for LanguageTools
shubhsnov bd1c59d
Preferences infra for LanguageTools
7fbdfd7
Merge pull request #28 from subhashjha333/subhashMaster
shubhsnov 25ad286
Fixing JS ParameterHints
shubhsnov 9bac3c0
Fixing JS ParameterHints
183bb0e
Merge pull request #29 from subhashjha333/subhashMaster
shubhsnov 1f5c34e
Fixing Default Parameter Hints Provider
shubhsnov adca02b
Fixing Default Parameter Hints Provider
481e88a
Merge pull request #30 from subhashjha333/subhashMaster
shubhsnov 69b718d
Fixing Path Converters
shubhsnov 5316603
Fixing Path Converters
ab3a8ec
Fixing Lint in PathConverters
shubhsnov 0859a3f
Fixing Lint in PathConverters
35a3407
Retaining Posix Path on Win
shubhsnov 991a496
Retaining Posix Path on Win
a287c84
Merge pull request #31 from subhashjha333/subhashMaster
shubhsnov 6bc0bfc
Fixing lint errors
shubhsnov 5336b1a
Fixing lint errors
fa6563b
Fixing Node side Utils
shubhsnov 45d46fa
Fixing Node side Utils
3fe3008
Merge pull request #32 from subhashjha333/subhashMaster
shubhsnov e89f52c
Fixing Promise related Issues
shubhsnov 7a55ba0
Fixing Promise related Issues
1acd762
Merge pull request #33 from subhashjha333/subhashMaster
shubhsnov 2bb01b2
Set Server Capability in Start call
shubhsnov 603c07d
Set Server Capability in Start call
a859b9a
Merge pull request #34 from subhashjha333/subhashMaster
shubhsnov 2e49aed
Review Comments & Bug Fixes
shubhsnov 466c7f9
Review Comments & Bug Fixes
4b65e19
Merge pull request #35 from subhashjha333/subhashMaster
shubhsnov bc06314
Addressing Review Comments
shubhsnov c8d38aa
Addressing Review Comments
3b972f3
Fixing Lint
shubhsnov 398be65
Fixing Lint
56a12b1
Merge pull request #36 from subhashjha333/subhashMaster
shubhsnov 0a28890
Merge pull request #37 from subhashjha333/fixAuthor
shubhsnov 9f46857
Merge pull request #38 from subhashjha333/subhashMaster
shubhsnov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
/* | ||
* Copyright (c) 2019 - present Adobe. All rights reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a | ||
* copy of this software and associated documentation files (the "Software"), | ||
* to deal in the Software without restriction, including without limitation | ||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
* and/or sell copies of the Software, and to permit persons to whom the | ||
* Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
* DEALINGS IN THE SOFTWARE. | ||
* | ||
*/ | ||
|
||
define(function (require, exports, module) { | ||
"use strict"; | ||
|
||
var Commands = require("command/Commands"), | ||
AppInit = require("utils/AppInit"), | ||
CommandManager = require("command/CommandManager"), | ||
EditorManager = require("editor/EditorManager"), | ||
PerfUtils = require("utils/PerfUtils"), | ||
Menus = require("command/Menus"), | ||
ProviderRegistrationHandler = require("features/PriorityBasedRegistration").RegistrationHandler; | ||
|
||
var _providerRegistrationHandler = new ProviderRegistrationHandler(), | ||
registerJumpToDefProvider = _providerRegistrationHandler.registerProvider.bind(_providerRegistrationHandler), | ||
removeJumpToDefProvider = _providerRegistrationHandler.removeProvider.bind(_providerRegistrationHandler); | ||
|
||
|
||
/** | ||
* Asynchronously asks providers to handle jump-to-definition. | ||
* @return {!Promise} Resolved when the provider signals that it's done; rejected if no | ||
* provider responded or the provider that responded failed. | ||
*/ | ||
function _doJumpToDef() { | ||
var request = null, | ||
result = new $.Deferred(), | ||
jumpToDefProvider = null, | ||
editor = EditorManager.getActiveEditor(); | ||
|
||
if (editor) { | ||
// Find a suitable provider, if any | ||
var language = editor.getLanguageForSelection(), | ||
enabledProviders = _providerRegistrationHandler.getProvidersForLanguageId(language.getId()); | ||
|
||
PerfUtils.markStart(PerfUtils.JUMP_TO_DEFINITION); | ||
|
||
enabledProviders.some(function (item, index) { | ||
if (item.provider.canJumpToDef(editor)) { | ||
jumpToDefProvider = item.provider; | ||
return true; | ||
} | ||
}); | ||
|
||
if (jumpToDefProvider) { | ||
request = jumpToDefProvider.doJumpToDef(editor); | ||
|
||
if (request) { | ||
request.done(function () { | ||
PerfUtils.finalizeMeasurement(PerfUtils.JUMP_TO_DEFINITION); | ||
result.resolve(); | ||
}).fail(function () { | ||
// terminate timer that was started above | ||
PerfUtils.finalizeMeasurement(PerfUtils.JUMP_TO_DEFINITION); | ||
result.reject(); | ||
}); | ||
} else { | ||
// terminate timer that was started above | ||
PerfUtils.finalizeMeasurement(PerfUtils.JUMP_TO_DEFINITION); | ||
result.reject(); | ||
} | ||
} else { | ||
EditorManager.doJumpToDef(); | ||
} | ||
} else { | ||
result.reject(); | ||
} | ||
|
||
return result.promise(); | ||
} | ||
|
||
AppInit.htmlReady(function () { | ||
CommandManager.get(Commands.NAVIGATE_JUMPTO_DEFINITION)._commandFn = _doJumpToDef; | ||
Menus.getContextMenu(Menus.ContextMenuIds.EDITOR_MENU).addMenuItem(Commands.NAVIGATE_JUMPTO_DEFINITION); | ||
}); | ||
|
||
exports.registerJumpToDefProvider = registerJumpToDefProvider; | ||
exports.removeJumpToDefProvider = removeJumpToDefProvider; | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: fix indentation.