Compare commits
5 Commits
352e5e81fc
...
1e8ce88613
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e8ce88613 | ||
|
|
f2fa6c1267 | ||
|
|
42fe89b22b | ||
|
|
ce01877872 | ||
|
|
a3412c9fdf |
@@ -44,7 +44,7 @@ vim.g.mapleader = ' '
|
||||
|
||||
vim.g.neovide_scale_factor = 1.0
|
||||
vim.g.neovide_theme = 'auto'
|
||||
vim.g.neovide_transparency = 1.0
|
||||
vim.g.neovide_opacity = 1.0
|
||||
function ChangeScaleFactor(delta)
|
||||
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta
|
||||
end
|
||||
@@ -56,7 +56,7 @@ vim.keymap.set('n', '<C-->', function()
|
||||
ChangeScaleFactor(1 / 1.25)
|
||||
end)
|
||||
|
||||
vim.opt.guifont = { 'Iosevka Term SS12', ':h12' }
|
||||
vim.opt.guifont = { 'Iosevka Term SS12', ':h14' }
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
vim.g.netrw_keepdir = 0
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
;;; -*- lexical-binding: t; -*-
|
||||
|
||||
(global-set-key (kbd "C-c f") #'consult-fd)
|
||||
(global-set-key (kbd "C-c C-f") #'find-file-at-point)
|
||||
(global-set-key (kbd "C-c r") #'recentf)
|
||||
(global-set-key (kbd "C-c 0") (lambda () (interactive) (other-window 1) (kill-buffer-and-window)))
|
||||
(global-set-key (kbd "C-c g") #'consult-ripgrep)
|
||||
(global-set-key (kbd "C-c i") #'consult-info)
|
||||
(global-set-key (kbd "C-c s") #'ispell-word)
|
||||
@@ -18,7 +20,7 @@
|
||||
(global-set-key (kbd "C-c l D") #'eglot-find-declaration)
|
||||
(global-set-key (kbd "C-c l i") #'eglot-find-implementation)
|
||||
(global-set-key (kbd "C-c l t") #'eglot-find-typeDefinition)
|
||||
(global-set-key (kbd "C-x C-;") (lambda () (interactive) (if (region-active-p) (comment-region) (comment-line))))
|
||||
;; (global-set-key (kbd "C-x C-;") (lambda () (interactive) (if (region-active-p) (comment-region) (comment-line))))
|
||||
|
||||
(global-set-key (kbd "C-c b") #'ibuffer)
|
||||
(global-set-key (kbd "C-c x") #'kill-current-buffer)
|
||||
@@ -26,7 +28,7 @@
|
||||
(global-set-key (kbd "C-c k") #'eldoc)
|
||||
(global-set-key (kbd "C-c m") #'man)
|
||||
(global-set-key (kbd "C-c o c") (lambda () (interactive) (dired user-init-dir)))
|
||||
(global-set-key (kbd "C-c o t") #'eshell)
|
||||
(global-set-key (kbd "C-c o t") (lambda () (interactive) (eshell 'N)))
|
||||
(global-set-key (kbd "C-c o m") #'magit)
|
||||
|
||||
;; multi-cursor
|
||||
|
||||
@@ -45,11 +45,31 @@
|
||||
:defer t
|
||||
:straight '(:type git :host codeberg :repo "meow_king/zig-ts-mode"))
|
||||
|
||||
(use-package haskell-ts-mode
|
||||
:ensure t
|
||||
:custom
|
||||
(haskell-ts-font-lock-level 4)
|
||||
(haskell-ts-use-indent t)
|
||||
(haskell-ts-ghci "ghci")
|
||||
(haskell-ts-use-indent t)
|
||||
:config
|
||||
(add-to-list 'treesit-language-source-alist
|
||||
'(haskell . ("https://github.com/tree-sitter/tree-sitter-haskell" "v0.23.1"))))
|
||||
;; (unless (treesit-grammar-location 'haskell)
|
||||
;; (treesit-install-language-grammar 'haskell)))
|
||||
|
||||
(use-package eglot-x
|
||||
:ensure t
|
||||
:defer t
|
||||
:straight '(:type git :host github :repo "nemethf/eglot-x"))
|
||||
|
||||
(use-package sly
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook common-lisp-mode
|
||||
:config
|
||||
(setq inferior-lisp-program "sbcl"))
|
||||
|
||||
(dolist (mode '(c-ts-mode-hook
|
||||
rust-ts-mode-hook
|
||||
odin-ts-mode-hook
|
||||
@@ -62,7 +82,9 @@
|
||||
|
||||
(with-eval-after-load 'eglot
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(zig-ts-mode . ("zls"))))
|
||||
'(zig-ts-mode . ("zls")))
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(haskell-ts-mode . ("haskell-language-server-wrapper" "--lsp"))))
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.odin\\'" . odin-ts-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.zig\\(?:\\.zon\\)?\\'" . zig-ts-mode))
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
:defer t
|
||||
:init
|
||||
;; Configure themes
|
||||
(setq auto-dark-themes '((doom-gruvbox) (doom-gruvbox-light)))
|
||||
(setq auto-dark-themes '((kaolin-dark) (kaolin-light)))
|
||||
;; Disable doom's theme loading mechanism (just to make sure)
|
||||
;; (setq! doom-theme nil)
|
||||
;; Declare that all themes are safe to load.
|
||||
|
||||
@@ -94,11 +94,48 @@
|
||||
;; (vertico-count 20) ;; Show more candidates
|
||||
;; (vertico-resize t) ;; Grow and shrink the Vertico minibuffer
|
||||
(vertico-cycle t) ;; Enable cycling for `vertico-next/previous'
|
||||
(vertico-multiform-mode)
|
||||
:init
|
||||
(vertico-multiform-mode)
|
||||
(vertico-mode)
|
||||
(define-key vertico-map (kbd "DEL") #'vertico-directory-delete-char))
|
||||
|
||||
(defvar +vertico-transform-functions nil)
|
||||
|
||||
(cl-defmethod vertico--format-candidate :around
|
||||
(cand prefix suffix index start &context ((not +vertico-transform-functions) null))
|
||||
(dolist (fun (ensure-list +vertico-transform-functions))
|
||||
(setq cand (funcall fun cand)))
|
||||
(cl-call-next-method cand prefix suffix index start))
|
||||
|
||||
(defun +vertico-highlight-directory (file)
|
||||
"If FILE ends with a slash, highlight it as a directory."
|
||||
(if (string-suffix-p "/" file)
|
||||
(propertize file 'face 'marginalia-file-priv-dir) ; or face 'dired-directory
|
||||
file))
|
||||
|
||||
;; function to highlight enabled modes similar to counsel-M-x
|
||||
(defun +vertico-highlight-enabled-mode (cmd)
|
||||
"If MODE is enabled, highlight it as font-lock-constant-face."
|
||||
(let ((sym (intern cmd)))
|
||||
(if (or (eq sym major-mode)
|
||||
(and
|
||||
(memq sym minor-mode-list)
|
||||
(boundp sym)))
|
||||
(propertize cmd 'face 'font-lock-constant-face)
|
||||
cmd)))
|
||||
|
||||
;; add-to-list works if 'file isn't already in the alist
|
||||
;; setq can be used but will overwrite all existing values
|
||||
(add-to-list 'vertico-multiform-categories
|
||||
'(file
|
||||
;; this is also defined in the wiki, uncomment if used
|
||||
;; (vertico-sort-function . vertico-sort-directories-first)
|
||||
(+vertico-transform-functions . +vertico-highlight-directory)))
|
||||
(add-to-list 'vertico-multiform-commands
|
||||
'(execute-extended-command
|
||||
(+vertico-transform-functions . +vertico-highlight-enabled-mode)))
|
||||
|
||||
|
||||
;; Enable rich annotations using the Marginalia package
|
||||
(use-package marginalia
|
||||
;; Bind `marginalia-cycle' locally in the minibuffer. To make the binding
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
(use-package parinfer-rust-mode
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook emacs-lisp-mode
|
||||
:hook ((emacs-lisp-mode common-lisp-mode lisp-mode scheme-mode) . parinfer-rust-mode)
|
||||
:config
|
||||
(electric-pair-mode -1))
|
||||
|
||||
@@ -99,5 +99,11 @@
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
;; (use-package zoxide
|
||||
;; :ensure t
|
||||
;; :defer t
|
||||
;; :hook eshell-mode
|
||||
;; :straight '(:type git host: sourcehut :repo "vonfry/zoxide.el"))
|
||||
|
||||
(provide 'utils)
|
||||
;;; utils.el ends here
|
||||
|
||||
Reference in New Issue
Block a user