Update Emacs LSP configuration

parent 24d0dab4
......@@ -636,17 +636,6 @@ in
'';
};
company-lsp = {
enable = true;
after = [ "company" ];
command = [ "company-lsp" ];
config = ''
(setq company-lsp-enable-snippet t
company-lsp-async t
company-lsp-cache-candidates 'auto)
'';
};
lsp-elm = {
enable = true;
defer = true;
......@@ -669,7 +658,6 @@ in
''
(haskell-mode . (lambda ()
(direnv-update-environment)
(require 'lsp-haskell)
(lsp)))
''
];
......@@ -697,6 +685,19 @@ in
after = [ "flycheck" "lsp-ui" ];
};
lsp-completion = {
enable = true;
after = [ "lsp-mode" ];
config = ''
(setq lsp-completion-enable-additional-text-edit nil)
'';
};
lsp-diagnostics = {
enable = true;
after = [ "lsp-mode" ];
};
lsp-mode = {
enable = true;
command = [ "lsp" ];
......@@ -710,20 +711,23 @@ in
"C-c f r" = "lsp-find-references";
};
config = ''
(setq lsp-eldoc-render-all nil
lsp-modeline-code-actions-enable nil)
(setq lsp-diagnostics-provider :flycheck
lsp-eldoc-render-all nil
lsp-modeline-code-actions-enable nil
lsp-modeline-diagnostics-enable nil
lsp-modeline-workspace-status-enable nil)
'';
};
lsp-modeline = {
enable = true;
after = [ "lsp-mode" ];
};
lsp-java = {
enable = true;
hook = [
''
(java-mode . (lambda ()
(require 'lsp-java)
(lsp)))
''
];
defer = true;
hook = [ "(java-mode . lsp)" ];
bindLocal = {
java-mode-map = {
"C-c r o" = "lsp-java-organize-imports";
......@@ -732,15 +736,16 @@ in
config = ''
(setq lsp-java-save-actions-organize-imports nil
lsp-java-completion-favorite-static-members
'("org.assertj.core.api.Assertions.*"
"org.assertj.core.api.Assumptions.*"
"org.hamcrest.Matchers.*"
"org.junit.Assert.*"
"org.junit.Assume.*"
"org.junit.jupiter.api.Assertions.*"
"org.junit.jupiter.api.Assumptions.*"
"org.junit.jupiter.api.DynamicContainer.*"
"org.junit.jupiter.api.DynamicTest.*"))
["org.assertj.core.api.Assertions.*"
"org.assertj.core.api.Assumptions.*"
"org.hamcrest.Matchers.*"
"org.junit.Assert.*"
"org.junit.Assume.*"
"org.junit.jupiter.api.Assertions.*"
"org.junit.jupiter.api.Assumptions.*"
"org.junit.jupiter.api.DynamicContainer.*"
"org.junit.jupiter.api.DynamicTest.*"
"org.mockito.ArgumentMatchers.*"])
'';
};
......@@ -762,7 +767,7 @@ in
};
dap-mode = {
enable = true;
enable = false;
after = [ "lsp-mode" ];
command = [ "dap-mode" "dap-auto-configure-mode" ];
config = ''
......@@ -771,7 +776,7 @@ in
};
dap-ui = {
enable = true;
enable = false;
after = [ "dap-mode" ];
command = [ "dap-ui-mode" ];
config = ''
......@@ -780,7 +785,7 @@ in
};
dap-java = {
enable = true;
enable = false;
after = [ "dap-mode" "lsp-java" ];
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment