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.

90 lines
2.8 KiB

4 years ago
4 years ago
4 years ago
  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 dap-mode
  9. :commands (dap-debug))
  10. (use-package docker
  11. :commands (docker))
  12. (dotfiles/leader
  13. "k" '(docker :which-key "Docker"))
  14. (use-package projectile
  15. :custom (projectile-project-search-path '("~/.local/source"))
  16. :config (projectile-mode))
  17. (use-package company
  18. :after lsp)
  19. (use-package company-lsp
  20. :after (lsp company)
  21. :custom (company-backend 'company-lsp))
  22. (use-package password-store
  23. :custom (password-store-dir dotfiles/passwords))
  24. (dotfiles/leader
  25. "p" '(:ignore t :which-key "Passwords")
  26. "pp" '(password-store-copy :which-key "Copy")
  27. "pr" '(password-store-rename :which-key "Rename")
  28. "pg" '(password-store-generate :which-key "Generate"))
  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. (add-to-list 'org-structure-template-alist '("cpp" . "src cpp")))
  51. (use-package python-mode
  52. :hook (python-mode . lsp-deferred)
  53. :config (require 'dap-python)
  54. (add-to-list 'org-src-lang-modes '("python" . python))
  55. (add-to-list 'org-structure-template-alist '("py" . "src python"))
  56. (org-babel-do-load-languages 'org-babel-load-languages '((python . t)))
  57. :custom (python-shell-interpreter "python3") ;; Required if "python" is not python 3.
  58. (dap-python-executable "python3") ;; Same as above.
  59. (dap-python-debugger 'debugpy))
  60. (use-package plantuml-mode
  61. :after org
  62. :custom (plantuml-default-exec-mode 'jar)
  63. (plantuml-jar-path "~/.local/bin/plantuml.jar")
  64. (org-plantuml-jar-path (expand-file-name "~/.local/bin/plantuml.jar"))
  65. (org-startup-with-inline-images t)
  66. :config (add-to-list 'org-src-lang-modes '("plantuml" . plantuml))
  67. (add-to-list 'org-structure-template-alist '("pl" . "src plantuml"))
  68. (org-babel-do-load-languages 'org-babel-load-languages '((plantuml . t))))
  69. (dotfiles/leader
  70. "ti" '(org-toggle-inline-images :which-key "Images"))