Switched to LSP backend, added packages to install and configuration

In Emacs, I switched to the LSP backend for C/C++, CSS, Dart, HTML, Go,
Javascript and Python. I also removed a redundant line for web-beautify, and I
removed the plantuml layer since I don’t use it.

This lead to the installation of multiple packages, some of which were already
required but not explicitly installed by the bootstrap. I added the packages
existing in the Arch repos and the AUR, and some packages will get installed by
pip or by go’s package manager. I also set up the configuration of Chicken, and
more precisely, of its documentation.
This commit is contained in:
Lucien Cartier-Tilet 2019-11-10 10:40:34 +01:00
parent 25ac48f23a
commit ccedf83ac9
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
3 changed files with 145 additions and 46 deletions

View File

@ -51,14 +51,20 @@ This function should only modify configuration layer settings."
(c-c++ :variables (c-c++ :variables
c-c++-default-mode-for-headers 'c-mode c-c++-default-mode-for-headers 'c-mode
c-c++-adopt-subprojects t c-c++-adopt-subprojects t
c-c++-enable-clang-support t
c-c++-enable-google-style t c-c++-enable-google-style t
c-c++-enable-c++11 t) c-c++-enable-c++11 t
c-c++-backend 'lsp-ccls
c-c++-lsp-executable "/usr/bin/ccls"
c-c++-lsp-sem-highlight-method 'overlay
c-c++-lsp-sem-highlight-rainbow t
c-c++-adopt-subprojects t
c++-enable-organize-includes-on-save t)
(cmake :variables (cmake :variables
cmake-enable-cmake-ide-support t) cmake-enable-cmake-ide-support t)
conlanging conlanging
csv csv
colors colors
dart
dired-phundrak dired-phundrak
django django
docker docker
@ -69,21 +75,29 @@ This function should only modify configuration layer settings."
github github
graphviz graphviz
(go :variables (go :variables
go-use-gometalinter t go-backend 'lsp
go-tab-width 2) go-tab-width 2
go-use-golangci-lint t)
gnus gnus
gpu gpu
(helm :variables (helm :variables
helm-no-header t helm-no-header t
helm-use-fuzzy 'source) helm-use-fuzzy 'source)
(html :variables (html :variables
web-fmt-tool 'web-beautify) web-fmt-tool 'web-beautify
css-enable-lsp t
less-enable-lsp t
scss-enable-lsp t
html-enable-lsp t)
(ibuffer :variables (ibuffer :variables
ibuffer-group-buffers-by 'projects) ibuffer-group-buffers-by 'projects)
imenu-list imenu-list
(javascript :variables (javascript :variables
javascript-backend 'tern javascript-backend 'lsp
javascript-fmt-tool 'web-beautify) javascript-lsp-linter nil
javascript-fmt-tool 'web-beautify
javascript-repl 'skewer
node-add-modules-path t)
(json :variables (json :variables
json-fmt-tool 'web-beautify) json-fmt-tool 'web-beautify)
(latex :variables (latex :variables
@ -91,6 +105,7 @@ This function should only modify configuration layer settings."
latex-enable-auto-fill t latex-enable-auto-fill t
latex-enable-folding t latex-enable-folding t
latex-enable-magic t) latex-enable-magic t)
lsp
(markdown :variables (markdown :variables
markdown-live-preview-engine 'vmd markdown-live-preview-engine 'vmd
markdown-mmm-auto-modes '("c" markdown-mmm-auto-modes '("c"
@ -110,25 +125,25 @@ This function should only modify configuration layer settings."
org-return-follows-link t) org-return-follows-link t)
pass pass
pdf pdf
(plantuml :variables
plantuml-jar-path "/opt/plantuml/plantuml.jar"
org-plantuml-jar-path "/opt/plantuml/plantuml.jar")
prettier prettier
prolog prolog
(python :variables (python :variables
python-backend 'anaconda python-backend 'lsp
python-sort-imports-on-save t python-sort-imports-on-save t
python-fill-column 80 python-fill-column 80
python-enable-yapf-format-on-save t) python-test-runner '(pytest nose)
python-formatter 'lsp)
(restclient :variables (restclient :variables
restclient-use-org t) restclient-use-org t)
rust (rust :variables rust-backend 'lsp)
scheme (scheme :variables
geiser-chicken-binary "chicken-csi")
semantic semantic
(shell :variables (shell :variables
shell-default-height 40 shell-default-height 40
shell-default-position 'right shell-default-position 'right
shell-default-shell 'eshell) shell-default-shell 'eshell
shell-default-full-span nil)
shell-scripts shell-scripts
selectric selectric
semantic semantic
@ -148,7 +163,6 @@ This function should only modify configuration layer settings."
twitter twitter
unicode-fonts unicode-fonts
w3m w3m
web-beautify
xkcd xkcd
web-beautify web-beautify
yaml) yaml)
@ -164,6 +178,7 @@ This function should only modify configuration layer settings."
edit-indirect edit-indirect
elcord elcord
eshell-git-prompt eshell-git-prompt
flycheck-golangci-lint
kaolin-themes kaolin-themes
magit-gitflow magit-gitflow
meson-mode meson-mode

View File

@ -102,30 +102,34 @@ end
set PACKAGES \ set PACKAGES \
acpilight asar ascii aspell-en aspell-fr assimp awesome-terminal-fonts \ acpilight asar ascii aspell-en aspell-fr assimp awesome-terminal-fonts \
base-devel bat biber bleachbit bluez-firmware bluez-utils bookworm boost bzip2 \ base-devel bat biber bleachbit bluez-firmware bluez-utils bookworm boost bzip2 \
chromium clisp compton cppcheck cppreference cppreference-devhelp cpupower \ chiken chromium clisp compton cppcheck cppreference cppreference-devhelp \
cronie cryptsetup device-mapper diffutils discord-canary discount ditaa dmenu \ cpupower cronie cryptsetup device-mapper diffutils discord-canary discount \
dmenu-lpass docker docker-compose doxygen dunst dwarffortress emacs \ ditaa dmenu dmenu-lpass docker docker-compose doxygen dunst dwarffortress \
exfat-utils farbfel ffmpegthumbnailer findutils firefox flake8 \ emacs exfat-utils farbfel ffmpegthumbnailer findutils firefox flake8 \
font-mathematica fontforge freeglut fzf gcc-libs gdb gimp glibc \ font-mathematica fontforge freeglut fzf gcc-libs gdb gimp glibc \
gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts gnuplot go-tools \ gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts gnuplot go-tools \
graphviz htop i3-gaps i3lock-blur i3status igdm-bin inetutils j4-dmenu-desktop \ golangci-lint-bin graphviz htop i3-gaps i3lock-blur i3status igdm-bin \
jfsutils jmtpfs lastpass-cli less linux-headers lldb logrotate lvm2 ly-git \ inetutils j4-dmenu-desktop javascript-typescript-langserver jfsutils jmtpfs \
meson minted mpc mpd mpd-rich-presence-discord-git mpv mupdf-tools nano ncdu \ lastpass-cli less linux-headers lldb logrotate lvm2 ly-git meson minted mpc \
ncmpcpp nemo-fileroller nemo-preview neofetch neovim netctl networkmanager \ mpd mpd-rich-presence-discord-git mpv mupdf-tools nano ncdu ncmpcpp \
networkmanager-openvpn nm-connection-editor nnn nomacs noto-fonts-emoji npm \ nemo-fileroller nemo-preview neofetch neovim netctl networkmanager \
ntfs-3g numlockx openssh p7zip pacman-contrib pandoc-bin pavucontrol pciutils \ networkmanager-openvpn nm-connection-editor nnn nodejs-vmd nomacs \
pcurses pdfpc polybar pulseaudio-bluetooth python-envtpl-git python-pip \ noto-fonts-emoji npm ntfs-3g numlockx openssh p7zip pacman-contrib pandoc-bin \
pavucontrol pciutils pcurses pdfpc polybar prettier pulseaudio-bluetooth \
python-autoflake python-envtpl-git python-epc python-importmagic \
python-language-server python-nose python-pip python-ptvsd python-pytest \
python-pywal qemu r raw-thumbnailer reflector rofi rofi-wifi-menu-git rsync \ python-pywal qemu r raw-thumbnailer reflector rofi rofi-wifi-menu-git rsync \
rtv rustup s-nail samba scrot sent shadow siji-git simplescreenrecorder \ -rtv rustup s-nail samba scrot sent shadow siji-git simplescreenrecorder \
speedcrunch sshfs st-luke-git swi-prolog texlive-most texlive-bin \ speedcrunch sshfs st-luke-git swi-prolog texlive-most texlive-bin \
texlive-langchinese texlive-langcyrillic texlive-langgreek \ texlive-langchinese texlive-langcyrillic texlive-langgreek \
texlive-langjapanese texlive-langkorean texlive-latexextra \ texlive-langjapanese texlive-langkorean texlive-latexextra \
texlive-localmanager-git tmux tree ttf-arphic-uming ttf-baekmuk \ texlive-localmanager-git tmux tree ttf-arphic-uming ttf-baekmuk \
ttf-bitstream-vera ttf-dejavu ttf-google-fonts-opinionated-git ttf-joypixels \ ttf-bitstream-vera ttf-dejavu ttf-google-fonts-opinionated-git ttf-joypixels \
ttf-liberation ttf-material-design-icons-git ttf-ms-fonts ttf-symbola \ ttf-liberation ttf-material-design-icons-git ttf-ms-fonts ttf-symbola \
ttf-tibetan-machine ttf-twemoji-color ttf-unifont unicode unicode-emoji unrar \ ttf-tibetan-machine ttf-twemoji-color ttf-unifont typescript unicode \
usbutils valgrind w3m wget x11-ssh-askpass xclip xdg-user-dirs-gtk \ unicode-emoji unrar usbutils valgrind w3m wget x11-ssh-askpass xclip \
xdotool xorg-drivers xorg-apps xfsprogs xorg-server xorg-xinit xss-lock yapf xdg-user-dirs-gtk xorg-drivers xorg-apps xfsprogs xorg-server xorg-xinit \
xss-lock xvkbd yapf
printf "\n# Installing needed packages ##################################################\n\n" printf "\n# Installing needed packages ##################################################\n\n"
yay -S --needed $PACKAGES yay -S --needed $PACKAGES
@ -200,5 +204,28 @@ cargo install rustfmt racer
rustup component add src rustup component add src
rustup component add rls rustup component add rls
pip install --user pyls-isort pyls-mypy
go get -v golang.org/x/tools/gopls@latest
go get -u -v golang.org/x/tools/cmd/godoc
go get -u -v golang.org/x/tools/cmd/goimports
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v github.com/cweill/gotests/...
go get -u -v github.com/davidrjenni/reftools/cmd/fillstruct
go get -u -v github.com/fatih/gomodifytags
go get -u -v github.com/godoctor/godoctor
go get -u -v github.com/golangci/golangci-lint/cmd/golangci-lint
go get -u -v github.com/haya14busa/gopkgs/cmd/gopkgs
go get -u -v github.com/josharian/impl
go get -u -v github.com/mdempsky/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/zmb3/gogetdoc
chicken-install -s apropos chicken-doc
cd (chicken-csi -b -e "(import (chicken platform))" -p "(chicken-home)")
curl https://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | sudo tar zx
printf "\n# Clean the pacman and yay cache ##############################################\n\n" printf "\n# Clean the pacman and yay cache ##############################################\n\n"
yay -Sc --noconfirm yay -Sc --noconfirm

View File

@ -91,6 +91,9 @@
- [[#install-rust][Install Rust]] - [[#install-rust][Install Rust]]
- [[#install-the-toolchains][Install the toolchains]] - [[#install-the-toolchains][Install the toolchains]]
- [[#install-some-utilities][Install some utilities]] - [[#install-some-utilities][Install some utilities]]
- [[#install-some-python-packages][Install some python packages]]
- [[#install-go-packages][Install go packages]]
- [[#set-up-chicken-scheme-interpretercompiler][Set up Chicken (Scheme interpreter/compiler)]]
- [[#clean-the-pacman-and-yay-cache][Clean the =pacman= and =yay= cache]] - [[#clean-the-pacman-and-yay-cache][Clean the =pacman= and =yay= cache]]
- [[#licence][Licence]] - [[#licence][Licence]]
@ -792,30 +795,34 @@
set PACKAGES \ set PACKAGES \
acpilight asar ascii aspell-en aspell-fr assimp awesome-terminal-fonts \ acpilight asar ascii aspell-en aspell-fr assimp awesome-terminal-fonts \
base-devel bat biber bleachbit bluez-firmware bluez-utils bookworm boost bzip2 \ base-devel bat biber bleachbit bluez-firmware bluez-utils bookworm boost bzip2 \
chromium clisp compton cppcheck cppreference cppreference-devhelp cpupower \ chiken chromium clisp compton cppcheck cppreference cppreference-devhelp \
cronie cryptsetup device-mapper diffutils discord-canary discount ditaa dmenu \ cpupower cronie cryptsetup device-mapper diffutils discord-canary discount \
dmenu-lpass docker docker-compose doxygen dunst dwarffortress emacs \ ditaa dmenu dmenu-lpass docker docker-compose doxygen dunst dwarffortress \
exfat-utils farbfel ffmpegthumbnailer findutils firefox flake8 \ emacs exfat-utils farbfel ffmpegthumbnailer findutils firefox flake8 \
font-mathematica fontforge freeglut fzf gcc-libs gdb gimp glibc \ font-mathematica fontforge freeglut fzf gcc-libs gdb gimp glibc \
gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts gnuplot go-tools \ gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts gnuplot go-tools \
graphviz htop i3-gaps i3lock-blur i3status igdm-bin inetutils j4-dmenu-desktop \ golangci-lint-bin graphviz htop i3-gaps i3lock-blur i3status igdm-bin \
jfsutils jmtpfs lastpass-cli less linux-headers lldb logrotate lvm2 ly-git \ inetutils j4-dmenu-desktop javascript-typescript-langserver jfsutils jmtpfs \
meson minted mpc mpd mpd-rich-presence-discord-git mpv mupdf-tools nano ncdu \ lastpass-cli less linux-headers lldb logrotate lvm2 ly-git meson minted mpc \
ncmpcpp nemo-fileroller nemo-preview neofetch neovim netctl networkmanager \ mpd mpd-rich-presence-discord-git mpv mupdf-tools nano ncdu ncmpcpp \
networkmanager-openvpn nm-connection-editor nnn nomacs noto-fonts-emoji npm \ nemo-fileroller nemo-preview neofetch neovim netctl networkmanager \
ntfs-3g numlockx openssh p7zip pacman-contrib pandoc-bin pavucontrol pciutils \ networkmanager-openvpn nm-connection-editor nnn nodejs-vmd nomacs \
pcurses pdfpc polybar pulseaudio-bluetooth python-envtpl-git python-pip \ noto-fonts-emoji npm ntfs-3g numlockx openssh p7zip pacman-contrib pandoc-bin \
pavucontrol pciutils pcurses pdfpc polybar prettier pulseaudio-bluetooth \
python-autoflake python-envtpl-git python-epc python-importmagic \
python-language-server python-nose python-pip python-ptvsd python-pytest \
python-pywal qemu r raw-thumbnailer reflector rofi rofi-wifi-menu-git rsync \ python-pywal qemu r raw-thumbnailer reflector rofi rofi-wifi-menu-git rsync \
rtv rustup s-nail samba scrot sent shadow siji-git simplescreenrecorder \ -rtv rustup s-nail samba scrot sent shadow siji-git simplescreenrecorder \
speedcrunch sshfs st-luke-git swi-prolog texlive-most texlive-bin \ speedcrunch sshfs st-luke-git swi-prolog texlive-most texlive-bin \
texlive-langchinese texlive-langcyrillic texlive-langgreek \ texlive-langchinese texlive-langcyrillic texlive-langgreek \
texlive-langjapanese texlive-langkorean texlive-latexextra \ texlive-langjapanese texlive-langkorean texlive-latexextra \
texlive-localmanager-git tmux tree ttf-arphic-uming ttf-baekmuk \ texlive-localmanager-git tmux tree ttf-arphic-uming ttf-baekmuk \
ttf-bitstream-vera ttf-dejavu ttf-google-fonts-opinionated-git ttf-joypixels \ ttf-bitstream-vera ttf-dejavu ttf-google-fonts-opinionated-git ttf-joypixels \
ttf-liberation ttf-material-design-icons-git ttf-ms-fonts ttf-symbola \ ttf-liberation ttf-material-design-icons-git ttf-ms-fonts ttf-symbola \
ttf-tibetan-machine ttf-twemoji-color ttf-unifont unicode unicode-emoji unrar \ ttf-tibetan-machine ttf-twemoji-color ttf-unifont typescript unicode \
usbutils valgrind w3m wget x11-ssh-askpass xclip xdg-user-dirs-gtk \ unicode-emoji unrar usbutils valgrind w3m wget x11-ssh-askpass xclip \
xdotool xorg-drivers xorg-apps xfsprogs xorg-server xorg-xinit xss-lock yapf xdg-user-dirs-gtk xorg-drivers xorg-apps xfsprogs xorg-server xorg-xinit \
xss-lock xvkbd yapf
#+END_SRC #+END_SRC
These are the minimum I would have in my own installation. You can edit it These are the minimum I would have in my own installation. You can edit it
however you want. Lets install those. however you want. Lets install those.
@ -1043,6 +1050,56 @@
rustup component add rls rustup component add rls
#+END_SRC #+END_SRC
*** Install some python packages
:PROPERTIES:
:CUSTOM_ID: h-8155ae1a-0be1-489f-be13-9222f7686fb2
:END:
Some packages will be needed from pip in order to get our Emacs setup
correctly working. Lets install them locally for our user:
#+BEGIN_SRC fish
pip install --user pyls-isort pyls-mypy
#+END_SRC
*** Install go packages
:PROPERTIES:
:CUSTOM_ID: h-8c6e2311-eb84-4bf4-8e0b-948f89bc9664
:END:
For go development from Emacs, the Spacemacs go layer requires some packages
to be installed.
#+BEGIN_SRC fish
go get -v golang.org/x/tools/gopls@latest
go get -u -v golang.org/x/tools/cmd/godoc
go get -u -v golang.org/x/tools/cmd/goimports
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v github.com/cweill/gotests/...
go get -u -v github.com/davidrjenni/reftools/cmd/fillstruct
go get -u -v github.com/fatih/gomodifytags
go get -u -v github.com/godoctor/godoctor
go get -u -v github.com/golangci/golangci-lint/cmd/golangci-lint
go get -u -v github.com/haya14busa/gopkgs/cmd/gopkgs
go get -u -v github.com/josharian/impl
go get -u -v github.com/mdempsky/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/zmb3/gogetdoc
#+END_SRC
*** Set up Chicken (Scheme interpreter/compiler)
:PROPERTIES:
:CUSTOM_ID: h-10ffb0c0-8028-4e9c-842e-9e7d2c165c5b
:END:
Chicken needs to be set up before being used. First, we need to install its
documentation.
#+BEGIN_SRC fish
chicken-install -s apropos chicken-doc
#+END_SRC
Then, well complete the documentation like so:
#+BEGIN_SRC fish
cd (chicken-csi -b -e "(import (chicken platform))" -p "(chicken-home)")
curl https://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | sudo tar zx
#+END_SRC
*** Clean the =pacman= and =yay= cache *** Clean the =pacman= and =yay= cache
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-fa5307ec-065b-4d06-9d47-05ccde0da8ac :CUSTOM_ID: h-fa5307ec-065b-4d06-9d47-05ccde0da8ac