I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.5 KiB

4 years ago
  1. (use-package lsp-mode
  2. :custom (gc-cons-threshold 1000000000)
  3. (lsp-idle-delay 0.500))
  4. (use-package lsp-ui
  5. :custom (lsp-ui-doc-position 'at-point)
  6. (lsp-ui-doc-delay 0.500))
  7. (use-package docker)
  8. (dotfiles/leader
  9. "k" '(docker :which-key "Docker"))
  10. (use-package projectile
  11. :custom (projectile-project-search-path '("~/.local/source"))
  12. :config (projectile-mode))
  13. (use-package password-store
  14. :custom (password-store-dir dotfiles/passwords))
  15. (dotfiles/leader
  16. "p" '(:ignore t :which-key "Passwords")
  17. "pp" '(password-store-copy :which-key "Copy")
  18. "pr" '(password-store-rename :which-key "Rename")
  19. "pg" '(password-store-generate :which-key "Generate"))
  20. (use-package dap-mode)
  21. (use-package company)
  22. (use-package company-lsp)
  23. (use-package ccls
  24. :hook ((c-mode c++-mode objc-mode cuda-mode) .
  25. (lambda ()
  26. (require 'ccls)
  27. (lsp)))
  28. :config (add-to-list 'org-structure-template-alist '("cc" . "src cc")))
  29. (use-package python-mode
  30. :hook (python-mode . lsp)
  31. :config (require 'dap-python)
  32. (add-to-list 'org-src-lang-modes '("python" . python))
  33. (add-to-list 'org-structure-template-alist '("py" . "src python"))
  34. (org-babel-do-load-languages 'org-babel-load-languages '((python . t)))
  35. :custom (python-shell-interpreter "python3") ;; Required if "python" is not python 3.
  36. (dap-python-executable "python3") ;; Same as above.
  37. (dap-python-debugger 'debugpy))
  38. (use-package plantuml-mode
  39. :custom (plantuml-default-exec-mode 'jar)
  40. (plantuml-jar-path "~/.local/bin/plantuml.jar")
  41. (org-plantuml-jar-path (expand-file-name "~/.local/bin/plantuml.jar"))
  42. (org-startup-with-inline-images t)
  43. :config (add-to-list 'org-src-lang-modes '("plantuml" . plantuml))
  44. (add-to-list 'org-structure-template-alist '("pl" . "src plantuml"))
  45. (org-babel-do-load-languages 'org-babel-load-languages '((plantuml . t))))
  46. (dotfiles/leader
  47. "ti" '(org-display-inline-images :which-key "Images"))
  48. (setenv "GOPATH" (concat (getenv "HOME") "/.go/"))
  49. (setenv "PATH" (concat (getenv "GOPATH") "bin:" (getenv "PATH")))
  50. (use-package go-mode
  51. :hook (go-mode . lsp)
  52. :custom (lsp-go-gopls-server-path "~/.go/bin/gopls"))
  53. (defun dotfiles/go-hook ()
  54. (add-hook 'before-save-hook #'lsp-format-buffer t t)
  55. (add-hook 'before-save-hook #'lsp-organize-imports t t))
  56. (add-hook 'go-mode-hook #'dotfiles/go-hook)
  57. (add-to-list 'org-structure-template-alist '("go" . "src go"))