1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00

Added lsp suport

This commit is contained in:
Ryan Kes 2020-02-21 20:48:40 +01:00
parent 2dd89ba1db
commit 66873e60dd
5 changed files with 61 additions and 105 deletions

View File

@ -7,6 +7,8 @@
- [[#description][Description]]
- [[#maintainers][Maintainers]]
- [[#prerequisites][Prerequisites]]
- [[#applications][Applications]]
- [[#lsp-backends][LSP Backends]]
- [[#configured-applications][Configured Applications]]
- [[#fish][Fish]]
- [[#theme][Theme]]
@ -31,6 +33,7 @@ A repository of my personal configuration files.
+ [[https://github.com/alrayyes][@alrayyes]]
* Prerequisites
** Applications
- [[https://brave.com/][brave]]
- [[https://github.com/baskerville/bspwm][bspwm]]
- [[https://the.exa.website/][exa]]
@ -43,6 +46,15 @@ A repository of my personal configuration files.
- [[https://github.com/baskerville/sxhkd][sxhkd]]
- [[https://github.com/freedesktop/xcompmgr][xcompmgr]]
- [[https://github.com/stoeckmann/xwallpaper][xwallpaper]]
** LSP Backends
- [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]]
- [[https://github.com/MaskRay/ccls][ccls]]
- [[https://github.com/felixfbecker/php-language-server][php-language-server]]
- [[https://github.com/Microsoft/python-language-server][python-language-server]]
- [[https://github.com/theia-ide/typescript-language-server][typescript-language-server]]
- [[https://github.com/vscode-langservers/vscode-css-languageserver][vscode-css-languageserver]]
- [[https://github.com/vscode-langservers/vscode-html-languageserver][vscode-html-languageserver]]
- [[https://github.com/bmewburn/vscode-intelephense][vscode-intelephense]]
* Configured Applications
- [[https://github.com/alacritty/][alacritty]]

View File

@ -7,9 +7,7 @@
- [[#org-protocol-capture-html][org-protocol-capture-html]]
- [[#org-capture-templates][org-capture-templates]]
- [[#capture-web-data-for-org-protocol-capture-html][Capture web data for org-protocol-capture-html]]
- [[#counsel-spotify][Counsel Spotify]]
- [[#mu4e][mu4e]]
- [[#wttrinel][wttrin.el]]
- [[#elfeed][Elfeed]]
- [[#elfeed-and-elfeed-protocol-to-read-feeds][elfeed and elfeed-protocol to read feeds.]]
- [[#elfeed-org][elfeed-org]]
@ -116,12 +114,6 @@ Require package
"* %c\n%U %?%:initial"))
)
#+END_SRC
* [[https://github.com/Lautaro-Garcia/counsel-spotify][Counsel Spotify]]
Control Spotify with Counsel Spotify
#+BEGIN_SRC emacs-lisp
(setq counsel-spotify-client-id "03f9817b1b6946febf9a0573d28e3831"
counsel-spotify-client-secret (my-fetch-password :user "03f9817b1b6946febf9a0573d28e3831" :host "spotify.el"))
#+END_SRC
* [[https://www.djcbsoftware.nl/code/mu/mu4e.html][mu4e]]
Setup mu4e with multiple profiles
#+BEGIN_SRC emacs-lisp
@ -195,12 +187,6 @@ Setup mu4e with multiple profiles
(mu4e-refile-folder . "/andthensome/Archive"))))))
(add-hook 'mu4e-view-mode-hook 'visual-line-mode)
#+END_SRC
* [[https://github.com/bcbcarl/emacs-wttrin][wttrin.el]]
Emacs frontend for weather web service [[http://wttr.in/][wttr.in]]
#+BEGIN_SRC emacs-lisp
(setq wttrin-default-cities '("Amsterdam", "Volendam"))
#+END_SRC
* [[https://github.com/skeeto/elfeed][Elfeed]]
** elfeed and [[https://github.com/fasheng/elfeed-protocol][elfeed-protocol]] to read feeds.
#+BEGIN_SRC emacs-lisp

View File

@ -8,36 +8,22 @@
;; More information about these modules (and what flags they support) can be
;; found in modules/README.org.
(doom! :input
;;chinese
;;japanese
:completion
(doom! :completion
company ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
ivy ; a search engine for love and life
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs
;;fill-column ; a `fill-column' indicator
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
modeline ; snazzy, Atom-inspired modeline, plus API
nav-flash ; blink the current line after jumping
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup ; tame sudden yet inevitable temporary windows
+all ; catch all popups that start with an asterix
+defaults) ; default popup rules
pretty-code ; replace bits of code with pretty symbols
;;tabs ; an tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
window-select ; visually switch windows
@ -48,11 +34,7 @@
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
word-wrap ; soft wrapping with language-aware indent
@ -68,104 +50,53 @@
;;eshell ; a consistent, cross-platform shell (WIP)
;;shell ; a terminal REPL for Emacs
;;term ; terminals in Emacs
vterm ; another terminals in Emacs
;;vterm ; another terminals in Emacs
:checkers
spell
grammar
:tools
;;ansible
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
docker
editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
flycheck ; tasing you for every semicolon you forget
flyspell ; tasing you for misspelling mispelling
gist ; interacting with github gists
(lookup ; helps you navigate your code and documentation
+docsets) ; ...or in Dash docsets locally
lsp
;;macos ; MacOS-specific commands
magit ; a git porcelain for Emacs
make ; run make tasks from Emacs
pass ; password manager for nerds
pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
;;upload ; map local to remote projects via ssh/ftp
:lang
;;agda ; types of types of types of types...
;;assembly ; assembly for fun or debugging
(cc) ; C/C++/Obj-C madness
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
(cc +lsp) ; C/C++/Obj-C madness
data ; config/data formats
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;faust ; dsp, but you get to keep your soul
;;fsharp ; ML stands for Microsoft's Language
;;go ; the hipster dialect
;;(haskell +intero) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ;
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun
;;lean
(go
+lsp)
(javascript ; all(hope(abandon(ye(who(enter(here))))))
+lsp)
ledger ; an accounting system in Emacs
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org ; organize your plain life in plain text
+dragndrop ; drag & drop files/images into org buffers
;;+hugo ; use Emacs for hugo blogging
+ipython ; ipython/jupyter support for babel
+pandoc ; export-with-pandoc support
;;+pomodoro ; be fruitful with the tomato technique
+present) ; using org-mode for presentations
;;perl ; write code no one else can comprehend
(php + lsp) ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
(python) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;ruby ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;scheme ; a fully conniving family of lisps
(sh +lsp) ; she sells {ba,z,fi}sh shells on the C xor
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
(web +lsp) ; the tubes
(php
+lsp) ; perl's insecure younger brother
(python
+lsp) ; beautiful is better than ugly
(sh
+lsp) ; she sells {ba,z,fi}sh shells on the C xor
(web
+lsp) ; the tubes
:email
mu4e
;;notmuch
;;(wanderlust +gmail)
:app
calendar
irc ; how neckbeards socialize
(rss +org) ; emacs as an RSS reader
twitter ; twitter client https://twitter.com/vnought
write ; emacs for writers (fiction, notes, papers, etc.)
:config
;;literate
(default +bindings +smartparens))

View File

@ -5,8 +5,6 @@
;; (package! some-package)
;; (package! another-package :recipe (:host github :repo "username/repo"))
;; (package! builtin-package :disable t)
(package! counsel-spotify)
(package! wttrin)
(package! elfeed-protocol)
(package! elfeed-goodies)
(package! org-protocol-capture-html :recipe (:host github :repo "alphapapa/org-protocol-capture-html"))

View File

@ -17,6 +17,7 @@
Plug 'easymotion/vim-easymotion'
Plug 'farmergreg/vim-lastplace'
Plug 'jiangmiao/auto-pairs'
Plug 'junegunn/fzf'
Plug 'kien/ctrlp.vim'
Plug 'mbbill/undotree'
Plug 'mhinz/vim-signify'
@ -30,7 +31,6 @@
Plug 'vim-airline/vim-airline'
" }
" Programming {
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
@ -110,6 +110,11 @@
vnoremap < <gv
vnoremap > >gv
" LanguageClient-neovim
nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR>
nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
" For when you forget to sudo.. Really Write the file.
cmap w!! w !sudo tee % >/dev/null
" }
@ -156,4 +161,28 @@
" Load deoplete on startup
let g:deoplete#enable_at_startup = 1
" }
" LanguageClient-neovim {
" Required for operations modifying multiple buffers like rename.
set hidden
" Needed for tsx files to work with typescript-language-server
" https://github.com/theia-ide/typescript-language-server/issues/90
autocmd BufNewFile,BufRead *.tsx setlocal filetype=typescript.tsx.
let g:LanguageClient_serverCommands = {
\ 'c': ['/usr/bin/ccls'],
\ 'javascript': ['/usr/bin/typescript-language-server', '--stdio'],
\ 'javascript.tsx': ['/usr/bin/typescript-language-server', '--stdio'],
\ 'typescript': ['/usr/bin/typescript-language-server', '--stdio'],
\ 'typescript.tsx': ['/usr/bin/typescript-language-server', '-gg/-stdio'],
\ 'php': ['/usr/bin/php-language-server'],
\ 'python': ['/usr/bin/pyls'],
\ 'sh': ['/usr/bin/bash-language-server'],
\ 'css': ['/usr/bin/css-languageserver', '--stdio'],
\ 'scss': ['/usr/bin/css-languageserver', '--stdio'],
\ 'sass': ['/usr/bin/css-languageserver', '--stdio'],
\ 'html': ['/usr/bin/html-languageserver', '--stdio']
\ }
" }
" }