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.

89 lines
2.8 KiB

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