All Projects → emacs-lsp-legacy → Lsp Javascript

emacs-lsp-legacy / Lsp Javascript

Licence: gpl-3.0

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Lsp Javascript

Fsautocomplete
F# language server using Language Server Protocol
Stars: ✭ 208 (+278.18%)
Mutual labels:  language-server-protocol, emacs
Company Lsp
Company completion backend for lsp-mode
Stars: ✭ 238 (+332.73%)
Mutual labels:  language-server-protocol, emacs
Lsp Mode
Emacs client/library for the Language Server Protocol
Stars: ✭ 3,691 (+6610.91%)
Mutual labels:  language-server-protocol, emacs
Aurel
Search, vote for and download AUR packages from Emacs
Stars: ✭ 48 (-12.73%)
Mutual labels:  emacs
Ikeysnail
iKeySnail provides fully-configurable hardware keyboard functionalities for web browsing on iOS (iPadOS)
Stars: ✭ 48 (-12.73%)
Mutual labels:  emacs
Emacs.g
The Emacs Collective
Stars: ✭ 51 (-7.27%)
Mutual labels:  emacs
Glsl Language Server
Language server implementation for GLSL
Stars: ✭ 53 (-3.64%)
Mutual labels:  language-server-protocol
Intero
Stars: ✭ 1,042 (+1794.55%)
Mutual labels:  emacs
Remacs
Emacs style editor written in Racket
Stars: ✭ 52 (-5.45%)
Mutual labels:  emacs
Indium
A JavaScript development environment for Emacs
Stars: ✭ 1,058 (+1823.64%)
Mutual labels:  emacs
Graphql.el
GraphQL utilities
Stars: ✭ 50 (-9.09%)
Mutual labels:  emacs
Memrise.el
Emacs Memrise integration
Stars: ✭ 49 (-10.91%)
Mutual labels:  emacs
Fingers.el
Modal editing minor mode for Emacs
Stars: ✭ 51 (-7.27%)
Mutual labels:  emacs
Paredit Cheatsheet
A new, scalable source document for the Paredit Cheatsheet available as a png on the Emacs wiki
Stars: ✭ 48 (-12.73%)
Mutual labels:  emacs
Ivy Yasnippet
Preview yasnippet snippets with ivy
Stars: ✭ 53 (-3.64%)
Mutual labels:  emacs
Liberime
A emacs dynamic module provide librime bindings for emacs
Stars: ✭ 48 (-12.73%)
Mutual labels:  emacs
Mwim.el
Move to the beginning/end of line, code or comment
Stars: ✭ 51 (-7.27%)
Mutual labels:  emacs
Rubberduck
Better code navigation on GitHub: Usages, Definitions and Files Tree on code pages and pull requests
Stars: ✭ 50 (-9.09%)
Mutual labels:  language-server-protocol
All The Icons.el
A utility package to collect various Icon Fonts and propertize them within Emacs.
Stars: ✭ 1,048 (+1805.45%)
Mutual labels:  emacs
Org Evil
Evil extensions for Org-mode.
Stars: ✭ 51 (-7.27%)
Mutual labels:  emacs

DEPRECATED

You do not need this package anymore! Just use lsp-mode directly. Read the docs.

tl;dr:

(package-install 'lsp-mode)

(require 'lsp)
(require 'lsp-clients)

(add-hook 'js2-mode-hook 'lsp)

;; For dropdown autocomplete:
;; (package-install 'company)
;; (package-install 'company-lsp)
;; (require 'company)
;; (require 'company-lsp)
;;
;; For other fancy UI stuff:
;; (package-install 'lsp-ui)
;; (require 'lsp-ui)

lsp-javascript

Javascript, Typescript and Flow support for lsp-mode using one of:

Installation

From source

Clone this repository and lsp-mode to suitable paths, and add them to your load path:

(add-to-list 'load-path "<path to lsp-mode>")
(add-to-list 'load-path "<path to lsp-javascript>")

From MELPA

Install one of the available packages:

  • lsp-javascript-typescript
  • lsp-javascript-flow

Usage

Enabling lsp-javascript-typescript

(require 'lsp-javascript-typescript)
(add-hook 'js-mode-hook #'lsp-javascript-typescript-enable)
(add-hook 'typescript-mode-hook #'lsp-javascript-typescript-enable) ;; for typescript support
(add-hook 'js3-mode-hook #'lsp-javascript-typescript-enable) ;; for js3-mode support
(add-hook 'rjsx-mode #'lsp-javascript-typescript-enable) ;; for rjsx-mode support

You also need javascript-typescript-langserver installed and on your PATH.

npm i -g javascript-typescript-langserver

(sudo may be necessary depending on how you have npm setup)

NOTE: javascript-typescript-langserver doesn't take into account the completion prefix, which causes some glitchy completion when using company. lsp-javascript-typescript doesn't handle this yes; for now the following can be used as a fix:

(defun my-company-transformer (candidates)
  (let ((completion-ignore-case t))
    (all-completions (company-grab-symbol) candidates)))

(defun my-js-hook nil
  (make-local-variable 'company-transformers)
  (push 'my-company-transformer company-transformers))

(add-hook 'js-mode-hook 'my-js-hook)

Enabling lsp-javascript-flow

(require 'lsp-javascript-flow)
(add-hook 'js-mode-hook #'lsp-javascript-flow-enable)
(add-hook 'js2-mode-hook #'lsp-javascript-flow-enable) ;; for js2-mode support
(add-hook 'rjsx-mode #'lsp-javascript-flow-enable) ;; for rjsx-mode support

You also need flow-language-server installed and on your PATH.

npm i -g flow-language-server

(sudo may be necessary depending on how you have npm setup)

Enabling typescript-language-server

(require 'lsp-typescript)
(add-hook 'js-mode-hook #'lsp-typescript-enable)
(add-hook 'js2-mode-hook #'lsp-typescript-enable) ;; for js2-mode support
(add-hook 'rjsx-mode #'lsp-typescript-enable) ;; for rjsx-mode support

You also need typescript-language-server installed and on your PATH.

npm i -g typescript-language-server

(sudo may be necessary depending on how you have npm setup)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].