earnest ma 2024-01-09 07:19:51 -05:00
parent 7413d48ff4
commit 52429df53e
Signed by: earnest ma
GPG Key ID: A343F43342EB6E2A
3 changed files with 48 additions and 12 deletions

View File

@ -46,6 +46,10 @@
;; doesn't show in childframe, but might be useful in terminal ;; doesn't show in childframe, but might be useful in terminal
company-show-quick-access 1)) company-show-quick-access 1))
(after! ccls
(setq ccls-initialization-options '(:index (:comments 2) :completion (:detailedLabel t)))
(set-lsp-priority! 'ccls 2)) ; optional as ccls is the default in Doom
;; pinentry for emacs ssh gpg ;; pinentry for emacs ssh gpg
(use-package! pinentry (use-package! pinentry
:init (setq epg-pinentry-mode `loopback) :init (setq epg-pinentry-mode `loopback)
@ -139,6 +143,15 @@ headers"
(setq magit-revision-show-gravatars '("^Author: " . "^Commit: ")) (setq magit-revision-show-gravatars '("^Author: " . "^Commit: "))
;; https://arjenwiersma.nl/posts/cleaning-up-lsp-mode/
(defun aw/cleanup-lsp ()
"Remove all the workspace folders from LSP"
(interactive)
(let ((folders (lsp-session-folders (lsp-session))))
(while folders
(lsp-workspace-folders-remove (car folders))
(setq folders (cdr folders)))))
;; Whenever you reconfigure a package, make sure to wrap your config in an ;; Whenever you reconfigure a package, make sure to wrap your config in an
;; `after!' block, otherwise Doom's defaults may override your settings. E.g. ;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
;; ;;

View File

@ -115,7 +115,7 @@
:lang :lang
;;agda ; types of types of types of types... ;;agda ; types of types of types of types...
;;beancount ; mind the GAAP ;;beancount ; mind the GAAP
;;(cc +lsp) ; C > C++ == 1 (cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp ;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all ;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs ;;coq ; proofs-as-programs

View File

@ -1,4 +1,4 @@
set showmatch " show matching set showmatch " show matching () {}
set ignorecase " case insensitive set ignorecase " case insensitive
set mouse=v " middle-click paste set mouse=v " middle-click paste
@ -30,25 +30,48 @@ endif
call plug#begin(stdpath('data') . '/plugged') call plug#begin(stdpath('data') . '/plugged')
Plug 'nvim-lua/plenary.nvim' Plug 'dracula/vim', { 'as': 'dracula' }
Plug 'TimUntersberger/neogit'
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-commentary'
Plug 'editorconfig/editorconfig-vim' Plug 'editorconfig/editorconfig-vim'
Plug 'wakatime/vim-wakatime' Plug 'wakatime/vim-wakatime'
call plug#end() call plug#end()
lua <<EOF colorscheme dracula
local neogit = require('neogit')
neogit.setup { " https://github.com/henrik/vim-reveal-in-finder/blob/master/plugin/reveal_in_finder.vim
disable_commit_confirmation = true, function! s:RevealInFinder()
disable_insert_on_commit = true if filereadable(expand("%"))
} let l:command = "open -R " . shellescape("%")
EOF elseif getftype(expand("%:p:h")) == "dir"
:nmap <C-x>g :Neogit<CR> let l:command = "open " . shellescape("%") . ":p:h"
else
let l:command = "open ."
endif
execute ":silent! !" . l:command
" For terminal Vim not to look messed up.
redraw!
endfunction
command! Reveal call <SID>RevealInFinder()
" Auto close, Ctrl-v to not do
ino " ""<left>
ino ' ''<left>
ino ( ()<left>
ino [ []<left>
ino { {}<left>
ino {<CR> {<CR>}<ESC>O
" no ex mode " no ex mode
nnoremap Q <Nop> nnoremap Q <Nop>