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.

84 lines
2.6 KiB

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