Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
emacs.d
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
Liu Miao
emacs.d
Commits
38b48cd7
Commit
38b48cd7
authored
4 years ago
by
Liu Miao
Browse files
Options
Downloads
Patches
Plain Diff
Make a switch case between nox and lsp-mode
parent
3c6dd395
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lisp/prog-common.el
+32
-28
32 additions, 28 deletions
lisp/prog-common.el
lisp/templates/userconfig.template
+4
-0
4 additions, 0 deletions
lisp/templates/userconfig.template
with
36 additions
and
28 deletions
lisp/prog-common.el
+
32
−
28
View file @
38b48cd7
...
@@ -6,34 +6,38 @@
...
@@ -6,34 +6,38 @@
;;;
;;;
;;; Language server protocol
;;; Language server protocol
(
use-package
nox
(
cond
:load-path
"lisp/nox"
((
eq
'nox
user/lsp-client
)
:config
(
use-package
nox
(
add-to-list
'nox-server-programs
:load-path
"lisp/nox"
`
(
python-mode
.
(
"pyls"
"-v"
"--tcp"
"--host"
:config
"localhost"
"--port"
:autoport
)))
(
add-to-list
'nox-server-programs
(
dolist
(
hook
(
list
`
(
python-mode
.
(
"pyls"
"-v"
"--tcp"
"--host"
'python-mode-hook
"localhost"
"--port"
:autoport
)))
'c-mode-hook
(
dolist
(
hook
(
list
'c-mode-common-hook
'python-mode-hook
'c++-mode-hook
'c-mode-hook
'haskell-mode-hook
))
'c-mode-common-hook
(
add-hook
hook
'
(
lambda
()
(
nox-ensure
)))))
'c++-mode-hook
'haskell-mode-hook
))
;; (use-package lsp-mode
(
add-hook
hook
'
(
lambda
()
(
nox-ensure
)))))
;; :ensure t
)
;; :init
((
eq
'lsp-mode
user/lsp-client
)
;; (setq lsp-keymap-prefix "C-c l")
(
use-package
lsp-mode
;; :hook (
:ensure
t
;; (c-mode . lsp-deferred)
:init
;; (c++-mode . lsp-deferred)
(
setq
lsp-keymap-prefix
"C-c l"
)
;; (python-mode . lsp-deferred)
:hook
(
;; (lsp-mode . lsp-enable-which-key-integration)
(
c-mode
.
lsp-deferred
)
;; )
(
c++-mode
.
lsp-deferred
)
;; :config
(
python-mode
.
lsp-deferred
)
;; (setq lsp-enable-snippet nil)
(
lsp-mode
.
lsp-enable-which-key-integration
)
;; :commands (lsp lsp-deferred)
)
;; )
:config
(
setq
lsp-enable-snippet
nil
)
:commands
(
lsp
lsp-deferred
)
)
))
(
use-package
lsp-ui
(
use-package
lsp-ui
:ensure
t
:ensure
t
...
...
This diff is collapsed.
Click to expand it.
lisp/templates/userconfig.template
+
4
−
0
View file @
38b48cd7
...
@@ -49,3 +49,7 @@
...
@@ -49,3 +49,7 @@
)
)
(
defvar
user/package-mirror
default-package-mirror
)
(
defvar
user/package-mirror
default-package-mirror
)
(
defvar
user/lsp-client
'nox
"If `nox' use nox as lsp client
If `lsp-mode' use lsp-mode as lsp client."
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment