zbelial / lspce

LSP Client for Emacs implemented as a module using rust.
GNU General Public License v3.0
154 stars 11 forks source link

Slight documentation improvement suggestions #7

Closed fast-90 closed 1 year ago

fast-90 commented 1 year ago

I'm not an Emacs "expert" by any means, but it was a trial-and-error process for me to get this setup. In particular, the following part was unclear to me:

# then you can rename the .so file (and copy it to another directory )
$ mv target/debug/liblspce_module.so lspce-module.so 
  1. The language in the comment makes it seem that the renaming is optional (you can) and that the target directory is arbitrary (another directory). My understanding thought is that you should rename the file for it to work, and the target directory should be the root folder for the lspce repo (e.g. .../site-lisp/lspce if following the instructions). I would reflect that in the wording to make it clearer.
  2. For me the files created with cargo build are named liblspace_module.d and liblspace_module.dylib (presumably because I am on MacOS?), but the instructions should still apply. Maybe good to clarify?
  3. The :load-path "/path/to/lspce/lisp" part of the use-package declaration is confusing, given that in the installation instructions you would have no lisp folder in "/path/to/lspce/". Maybe change to reflect that?

It doesn't amount to much, but I think these suggestions can make it easier for newer people like me to set it up :)

zbelial commented 1 year ago

Thanks very much for all of these suggestions. I'll improve the documentation ASAP.

  1. The renaming is a must. I'm not a native English speaker, so that some words/expressions are not accurate/proper. I'll try my best to improve the documentation.
  2. For MacOS, the extension of dynamic files created by rustc is .dylib. I think you should still rename the dylib file, but I have never used MacOS and haven't test lspce on it, maybe there are some problems.
  3. You're right. I'll change according to your suggestion.

Thanks again.

fast-90 commented 1 year ago

No problem! For the part I mentioned you could use something like:

# move the resulting .so file to the lspce folder (note the rename of the file as well)
$ mv target/debug/liblspce_module.so lspce-module.so 

# or alternatively, if .d and .dylib files are created for you:
$ mv target/debug/liblspce_module.d lspce-module.d
$ mv target/debug/liblspce_module.dylib lspce-module.dylib

With the above, I was able to use lspce on MacOS (I was able to get completions and error diagnostics, and find definitions/references and rename work). Only thing was that it wasn't aware of my virtual environment as mentioned in #6 .

zbelial commented 1 year ago

Thanks! Glad to hear that lspce works in some degree for you now. I guess I need some time to figure out what to do about #6 , but I'll.