tigersoldier / lsp-javacomp Goto Github PK
View Code? Open in Web Editor NEWEmacs Language Server client backed by JavaComp
License: GNU General Public License v3.0
Emacs Language Server client backed by JavaComp
License: GNU General Public License v3.0
I get the following error when trying to enable the package.
Autoloading file /home/vladimirkazanov/.emacs.d/elpa/lsp-javacomp-20181211.204/lsp-javacomp.el failed to define function lsp-javacomp-enable
Starting new Ispell process /usr/bin/aspell with british dictionary...
File mode specification error: (error javacomp: Cannot communicate with the process (exit))
LSP :: javacomp has exited (exited abnormally with code 1)
Server javacomp:25796 status:starting exited with status exit. Do you want to restart it? (y or n) n
I did install and update the server. I have googled and found nothing.
Please let me know what else I can provide you. I am new to this LSP stuff. (its working with C/C++ and lsp mode).
(use-package lsp-javacomp
:init
(add-hook 'java-mode-hook
(lambda ()
;; Load lsp-javacomp before enabling lsp, so that javacomp client
;; is registed.
(require 'lsp-javacomp)
(lsp)
;; Use company-lsp as the company completion backend
(set (make-variable-buffer-local 'company-backends) '(company-lsp))
;; Optional company-mode settings
(set (make-variable-buffer-local 'company-idle-delay) 0.1)
(set (make-variable-buffer-local 'company-minimum-prefix-length) 1)))
;; Optional, make sure JavaComp is installed. See below.
:config
(lsp-javacomp-install-server))
BTW your snippet in the read me is wrong.
(require 'lsp-javacomp')
Thanks for quick response last time!
Now I get a lot of errors with the following trace:
Debugger entered--Lisp error: (wrong-type-argument syntax-table-p t)
set-syntax-table(t)
(progn (set-syntax-table syntax-table) (bounds-of-thing-at-point-1 thing))
(unwind-protect (progn (set-syntax-table syntax-table) (bounds-of-thing-at-point-1 thing)) (set-syntax-table buffer-syntax))
(let ((buffer-syntax (syntax-table))) (unwind-protect (progn (set-syntax-table syntax-table) (bounds-of-thing-at-point-1 thing)) (set-syntax-table buffer-syntax)))
(if syntax-table (let ((buffer-syntax (syntax-table))) (unwind-protect (progn (set-syntax-table syntax-table) (bounds-of-thing-at-point-1 thing)) (set-syntax-table buffer-syntax))) (bounds-of-thing-at-point-1 thing))
bounds-of-thing-at-point(symbol t)
(let ((bounds (bounds-of-thing-at-point thing syntax-table))) (and bounds (buffer-substring (car bounds) (cdr bounds))))
(if (get thing 'thing-at-point) (let ((opoint (point))) (prog1 (funcall (get thing 'thing-at-point)) (constrain-to-field nil opoint))) (let ((bounds (bounds-of-thing-at-point thing syntax-table))) (and bounds (buffer-substring (car bounds) (cdr bounds)))))
thing-at-point(symbol t)
lsp-ui-sideline--run()
#f(compiled-function () #<bytecode 0x46359c5>)()
apply(#f(compiled-function () #<bytecode 0x46359c5>) nil)
timer-event-handler([t 0 0 200000 nil #f(compiled-function () #<bytecode 0x46359c5>) nil idle 0])
I set up things the way it's described in the readme, and use Emacs 26.1 on Ubuntu 18.04.
I had successfully configure cquery and a dart server with lsp-mode.
I am trying to configure lsp-javacomp but I have been not successful so far.
This is the error I receive when I open a java file after waiting around 6 seconds.
File mode specification error: (lsp-timed-out-error)
I installed the server with this commands:
M-x lsp-javacomp-install-server
M-x lsp-javacomp-update-server
This is part of my configuration:
(use-package lsp-mode
:config
(require 'lsp-flycheck))
(use-package lsp-javacomp
:config
(setq lsp-javacomp-server-install-dir "~/.emacs.d/javacomp/")
(add-hook 'java-mode-hook #'lsp-javacomp-enable))
(use-package company
:diminish ""
:bind (:map company-active-map
("C-j" . company-select-next)
("C-k" . company-select-previous))
:custom
(company-idle-delay 0.3)
:config
(push 'company-capf company-backends)
(global-company-mode))
(use-package company-lsp
:config
(setq company-lsp-enable-recompletion t)
(setq company-lsp-async t)
(setq company-lsp-enable-snippet t)
(push 'company-lsp company-backends))
This is the layout of where I am testing this configuration:
.
├── javacomp.json
└── Test.java
javacomp.json
{
"logPath": "/tmp/javacomp.log",
"logLevel": "fine",
}
Test.java
public class Test {
public static void main(String[] args) {
System.out.println("Hello, java");
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.