Skip to content

Instantly share code, notes, and snippets.

View vkjr's full-sized avatar

Volodymyr Kozieiev vkjr

View GitHub Profile
@vkjr
vkjr / show-lsp-diagnostics-xref.el
Created December 6, 2024 21:41
Command to show all project errors from LSP in a convenient xref buffer
(defun vk/show-lsp-diagnostics-xref ()
"Display LSP diagnostics in a persistent `xref`-style buffer."
(interactive)
(let ((diagnostics (lsp-diagnostics))
(xref-items '())) ;; Initialize xref items list
;; Collect diagnostics as `xref-item` structures
(maphash
(lambda (file errors)
(dolist (error errors)
(let* ((range (gethash "range" error))

Link to deps-new github.

Thank you, Sean Corfield!

Commands from the video

Install deps-new:

clj -Ttools install io.github.seancorfield/deps-new '{:git/tag "v0.4.13"}' :as new

@vkjr
vkjr / qtsnippets.txt
Last active March 10, 2019 09:09
Qt snippets
# propDeclaration
$type$ $name$() const;
void set$name:c$(const $type$& $name$);
#propImplementation
$type$ $className$::$name$() const { return $member$; }
void $className$::set$name:c$(const $type$& $name$) {
if ($name$ == $member$)
return;
@vkjr
vkjr / SquashCommitsInBranch.txt
Last active August 22, 2018 16:06
Squash few commits in branch before merge into master(develop)
git checkout yourBranch
git reset --soft HEAD~$(git rev-list --count HEAD ^develop)
git commit -m "one commit on yourBranch"