Coder Social home page Coder Social logo

manateelazycat / nox Goto Github PK

View Code? Open in Web Editor NEW
208.0 14.0 15.0 491 KB

Nox is a lightweight, high-performance LSP client for Emacs

Emacs Lisp 100.00%
lsp lsp-client emacs language-server mspyls intele code-completion jump-define code-refrences syntax-rename

nox's Introduction

Hi, I'm ManateeLazyCat

About Me

I often use English name Andy Stewart, my Chinese name is 王勇.

Here are some ideas to get you started:

  • Self-study computer and programming technology
  • Mobile game developer (2005 ~ 2007)
  • Create a clothing factory (2007 ~ 2009)
  • Pre-CTO of deepin operating system (2010 ~ 2018)
  • Own several IT companies now (2019 ~ now)
  • Like self-driving tour, live with kind wife and cute daughter
  • A lot of time on EAF and lsp-bridge

Skills: Python、C、C++、Emacs Lisp、Haskell、Golang、Vala、JavaScript、Ruby、Lua and more

Welcome to my Chinese blog: manateelazycat.github.io

Coding Life

Github Stats

Most Used Languages

Recent Activity

nox's People

Contributors

alaiyeshi025 avatar manateelazycat avatar nicehiro avatar nykma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nox's Issues

not working for pyls

when i set "nox-python-server" to "pyls" and open a python buffer, meet this problem: nox--python-contact: Invalid function: "pyls"

nox-show-doc not work when "WenQuanYi Micro Hei Mono" not available

If "WenQuanYi Micro Hei Mono" font is not available, nox-show-doc will produce the following error message:

error in process filter: set-face-attribute: Font not available: #<font-spec nil nil WenQuanYi\ Micro\ Hei\ Mono-14 nil nil nil nil nil nil nil nil nil ((:name . "WenQuanYi Micro Hei Mono-14") (:user-spec . "WenQuanYi Micro Hei Mono-14"))>

Is it possible to make nox-show-doc following the existing font configuration, or make the font configurable?

how does nox read ccls project-specific initialization

Hello, yet another question.

ccls can be configured via --init option to set cache directory, compilation database, and so on. This is entailed to working on a project, especially if the compilation database is resided in non-standard location.

When I use nox with minimal customization, nox doesn't recognize those options values automatically. Then I see the nox-workspace-configuration variable which seems to be a workaround to tackle this problem. However, I don't know the syntax and the way to give ccls's init option value, even though I have seen the examples for python's and go's lsp server programs.

Can you illustrate by giving a code piece to clarify how to do that?

Support for imenu

From my personal viewpoint, the Emacs imenu gives me a good overview of the whole project,
do you have any plan to add imenu integration?

Bad path construction, and bad assumption about mspyls existing

I recently installed nox, following the steps.

  1. I cloned repo 56f6bbc to a directory outside my .emacs config tree.
  2. I added that directory to load-path
  3. I added snippet from instructions in nox main page to file ~/.emacs.d/nox-ls-client.el.
  4. I load-filed that file.

I then immediately loaded a python file test_util.py.

ACTUAL: I got the following traceback in *Messages*

Error in post-command-hook ((closure ((--cl-maybe-connect-- closure #1 nil (progn (remove-hook 'post-command-hook --cl-maybe-connect-- nil) (let ((G1 buffer)) (if (buffer-live-p G1) (save-current-buffer (set-buffer G1) (if nox--managed-mode nil (apply #'nox--connect (nox--guess-contact)))))))) (buffer . #) nox--managed-mode company-tooltip-align-annotations company-backends t) nil (progn (remove-hook 'post-command-hook --cl-maybe-connect-- nil) (let ((G1 buffer)) (if (buffer-live-p G1) (save-current-buffer (set-buffer G1) (if nox--managed-mode nil (apply #'nox--connect (nox--guess-contact))))))))): (file-missing "Searching for program" "No such file or directory" "~/.emacs.d/nox/mspyls/Microsoft.Python.LanguageServer")

EXPECTED: No such error

ANALYSIS: note the path "~/.emacs.d/nox/mspyls/Microsoft.Python.LanguageServer". This is completely wrong. ".emacs.d" is the parent of MY .el file, not nox.el.

ANALYSIS: and in any case, mspyls is lacking everywhere on my system. It will never be found.

warning about nox

elisp:
(use-package nox :config (setq nox-shutdown t) (setq nox-python-path "/usr/local/bin/python3") (dolist (hook (list 'python-mode-hook )) (add-hook hook '(lambda () (nox-ensure)))) (add-to-list 'nox-server-programs (python-mode . ("mspyls" "--tcp" "--host"
"localhost" "--port" :autoport))
)
)`

Emacs said:
.emacs.d/init.el: Warning: (lambda nil ...) quoted with ' rather than with #'
.emacs.d/el/nox.el: Warning: Use keywords rather than deprecated positional arguments to `define-minor-mode'

Support lsp-jedi

It has some benefit compared to pyls. Unlike python-language-server, jedi-language-server:

Uses pygls instead of creating its own low-level Language Server Protocol bindings
Supports one powerful 3rd party library: Jedi. By only supporting Jedi, we can focus on supporting all Jedi features without exposing ourselves to too many broken 3rd party dependencies (I'm looking at you, rope).
Is supremely simple because of its scope constraints. Leave complexity to the Jedi master.

https://github.com/fredcamps/lsp-jedi

Completion support

The client declares snippet support in the default capabilities object, but I could't find any mention of snippets anywhere in the rest of the code, nor have I managed to get yasnippets working with this package.

If there is no support for snippets, the capability probably should be reported as unavailable, because it just pollutes completions with $n variables.

gopls rename error

jsonrpc-error: jsonrpc-error: "Edits on ‘definition_mobile.go’ require version 11, you have 12", (jsonrpc-error-code . 32603), (jsonrpc-error-message . "Edits on ‘definition_mobile.go’ require version 11, you have 12")
[2020-04-08T15:03:35.493987] 

Can nox indexes for the whole project? Not a single source file.

Nox is fast , but i find it can't auto complete for the whole project. Now i use it to write some codes in the linux kernel.
Nox can help me complete the membet of a struct variable, but it only support the variable definited in the current source.
When i use a new variable of another src, it can't work! Why?

Doc pertinent options are obsolete

In the README page, some doc or tooltip related customizations are introduced. But they are banished from the source code right? What I want to ask is that can I make the doc persistent and highlight the parameter. This behaviour can be compared to eldoc except eldoc shows information in the echo area.

And I'm using nox in C/C++. I don't know how the doc is displayed for other programming languages.

[jsonrpc] Server exited with status 126

M-x nox时出错,Python模式下。

NOX Stderr

emacs: /home/evanmeek/.emacs.d/var/nox/mspyls/Microsoft.Python.LanguageServer: 可执行文件格式错误

Process NOX (Code/python-mode) stderr finished

NOX output

empty

NOX events

`
internal Sat Apr 18 10:01:32 2020:
(:message "Connection state changed" :change "exited abnormally with code 126\n")

----------b---y---e---b---y---e----------
`

我用的mypyls

Is posframe necessary?

posframe-workable-p is a function defined in posframe package.

Since nox will work in TUI which posframe is not supported. How about change it to (bound-and-true-p posframe)?

not working with mspyls

Following the ReadMe, I set the nox-server-programs as below:
(add-to-list 'nox-server-programs '(python-mode . ("dotnet" "exec" "/Users/xxx/contrib/python-language-server/output/bin/Release/osx-x64/publish/Microsoft.Python.LanguageServer.dll"))))

Then I open a python buffer, run nox, and meet this problem(copied from the Nox events buffer):
server-reply (id:4) ERROR Sun Mar 29 14:52:50 2020: (:jsonrpc "2.0" :error (:code -32000 :message "Object reference not set to an instance of an object." :data " at Microsoft.Python.LanguageServer.Documents.Document.GetAnalysisAsync(Uri uri, IServiceContainer services, Int32 msTimeout, CancellationToxxxn cancellationToxxxn) in /Users/xxx/contrib/python-language-server/src/LanguageServer/Impl/Documents/Document.cs:line 28\n at Microsoft.Python.LanguageServer.Implementation.Server.Completion(CompletionParams params, CancellationToxxxn cancellationToxxxn) in /Users/xxx/contrib/python-language-server/src/LanguageServer/Impl/Implementation/Server.Editor.cs:line 41\n at Microsoft.Python.LanguageServer.Implementation.LanguageServer.Completion(JToxxxn toxxxn, CancellationToxxxn cancellationToxxxn) in /Users/xxx/contrib/python-language-server/src/LanguageServer/Impl/LanguageServer.cs:line 163") :id 4)

related information:

  • OS: OS X 10.14
  • emacs: 28.05
  • nox: the latest commit
  • mspyls: the latest master branch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.