Compare commits

..

No commits in common. "a8dfb8fd79119f2da858600755c3ce5d47aa9a8b" and "ac2b15e67398ecd6adcfb6834d14b3288a80e518" have entirely different histories.

8 changed files with 14 additions and 144 deletions

View file

@ -1,21 +0,0 @@
local v_cache = require "lib.v-cache"
local git_sha = "adc02c2976a3d90263b2c7ea7b10ed88ccdd06b7";
if v_cache.is_installed("fira-code", git_sha) then
return
end
local weights = { "Light", "Regular", "Medium", "SemiBold", "Bold", "Retina" }
for _, value in ipairs(weights) do
configz.download(os.getenv("HOME") .. "/.local/share/fonts/FiraCodeNerdFont-" .. value .. ".ttf", {
url = "https://github.com/ryanoasis/nerd-fonts/raw/" .. git_sha .. "/patched-fonts/FiraCode/" .. value .. "/FiraCodeNerdFont-" .. value .. ".ttf"
})
configz.download(os.getenv("HOME") .. "/.local/share/fonts/FiraCodeNerdFontMono-" .. value .. ".ttf", {
url = "https://github.com/ryanoasis/nerd-fonts/raw/" .. git_sha .. "/patched-fonts/FiraCode/" .. value .. "/FiraCodeNerdFontMono-" .. value .. ".ttf"
})
end
v_cache.install("fira-code", git_sha)

View file

@ -33,7 +33,7 @@ This is better than the `C-x +` and C-x - because this is global to emacs not
just in in the current buffer."
(interactive "nFont Size: ")
(setq aa-font "FiraCode Nerd Font Mono")
(setq aa-font "DejaVu Sans Mono")
(setq aa-v-font "Sans Serif")
;; (setq aa-v-font "Ubuntu")
@ -157,10 +157,6 @@ just in in the current buffer."
(setq org-directory "~/Org"
org-todo-keywords '((sequence "TODO" "WAITING" "REVIEW" "|" "DONE" "ARCHIVED"))
org-agenda-prefix-format '((agenda . " %?-12t% s")
(todo . " ")
(tags . " %i %-12:c")
(search . " %i %-12:c"))
org-hide-emphasis-markers t
org-agenda-window-setup 'current-window
org-export-with-broken-links "mark"
@ -169,11 +165,6 @@ just in in the current buffer."
org-export-with-toc nil
org-html-head "<style>body { font-family: system-ui; }</style>")
(defun aa/search-org-roam-notes ()
"Search in the Org-Roam folder using counsel-rg."
(interactive)
(counsel-rg nil org-roam-directory nil "Search Org Roam: "))
(setq org-agenda-custom-commands
'(("d" "Dashboard"
((agenda "" ((org-deadline-warning-days 7)))
@ -243,13 +234,6 @@ just in in the current buffer."
(setq-default org-download-image-dir (concat (file-name-as-directory org-directory) "Attachments")
org-download-heading-lvl nil))
(use-package languagetool
:straight t
:config
(setq languagetool-correction-language "en-GB"
languagetool-server-url "https://api.languagetool.org"
languagetool-server-port 443))
;;; Completion
(use-package company
@ -345,46 +329,10 @@ just in in the current buffer."
:query "query:inbox"
:sort-order oldest-first)))
(defun aa/notmuch-open-github-link ()
"Open the first GitHub Pull Request or Issue link in the current notmuch message or thread.
Works in both `notmuch-show-mode` and `notmuch-search-mode`."
(interactive)
(let (url (original-buffer (current-buffer)))
(cond
;; Handle notmuch-show-mode (email message view)
((eq major-mode 'notmuch-show-mode)
(save-excursion
(goto-char (point-min))
(if (re-search-forward "https://github\\.com/[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+/\\(pull\\|issues\\)/[0-9]+" nil t)
(setq url (match-string 0))
(message "No GitHub link found in the current message."))))
;; Handle notmuch-search-mode (search list view)
((eq major-mode 'notmuch-search-mode)
(let ((message-id (notmuch-search-find-thread-id)))
(when message-id
(save-window-excursion
(with-temp-buffer
(notmuch-show message-id nil nil)
(goto-char (point-min))
(if (re-search-forward "https://github\\.com/[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+/\\(pull\\|issues\\)/[0-9]+" nil t)
(setq url (match-string 0))
(message "No GitHub link found in the thread."))))))))
;; Open the URL in the browser
(if url
(browse-url url)
(message "No GitHub link found."))))
(evil-define-key 'normal notmuch-search-mode-map
"d" 'aa/notmuch-search-delete
"b" 'aa/notmuch-open-github-link)
(evil-define-key 'visual notmuch-search-mode-map
"d" 'aa/notmuch-search-delete)
"b" 'aa/notmuch-open-github-link)
(evil-define-key 'normal notmuch-show-mode-map
"b" 'aa/notmuch-open-github-link)
(evil-define-key 'normal notmuch-search-mode-map
"d" 'aa/notmuch-search-delete)
(evil-define-key 'visual notmuch-search-mode-map
"d" 'aa/notmuch-search-delete))
(defun aa/notmuch-search-inbox ()
"Helper function to search for the inbox messages (oldest message first).
@ -486,7 +434,7 @@ Works in both `notmuch-show-mode` and `notmuch-search-mode`."
(aa/leader-keys
;; Global bindings
"/" '(aa/search-org-roam-notes :which-key "Search Org Roam")
"/" '(counsel-projectile-ag :which-key "Search Project")
"TAB" '(evil-switch-to-windows-last-buffer :which-key "Last Buffer")
"SPC" '(counsel-M-x :which-key "M-x")

View file

@ -1,11 +1,10 @@
use path.nu *
use path.nu
use fzf.nu *
use neovim.nu *
use prompt.nu *
use sapling.nu *
use nvm.nu *
use rvm.nu *
nvm use default
@ -15,8 +14,6 @@ $env.config = {
env_change: {
PWD: [
{|_, after| nvm dir-hook $after }
{|_, after| rvm-dir-hook $after }
{|_, after| node-modules-dir-hook $after }
]
}
}

View file

@ -1,20 +1,4 @@
export-env {
$env.GOPATH = $"($env.HOME)/Code"
$env.PATH = $env.PATH
| split row ":"
| prepend ([$env.HOME ".cargo" "bin"] | path join)
| str join ":"
}
export def --env node-modules-dir-hook [dir: string] {
let nodePath = ([$dir, "node_modules", ".bin"] | path join)
if ($nodePath | path exists) {
$env.PATH = $env.PATH
| split row ":"
| where {|x| not ($x | str contains "node_modules")}
| prepend $nodePath
| str join ":"
}
}

View file

@ -1,41 +0,0 @@
# Plugin to manage ruby versions with rvm by reading the `.ruby-version` and
# `.ruby-gemset` files to install and setup your ruby version and the gemset.
#
# Like the custom nvmrc one this will only do something if you have the
# `.ruby-version` file in the current directory to try and reduce the amount of
# work that gets done on `cd`
def file-exists [file: string] {
($file | path exists) and ($file | path type) == "file"
}
export def --env rvm-use [version: string, gemset?: string] {
let env_map = if ($gemset | is-empty) {
(bash --login -c $"rvm use ($version); env" | lines | split column "=" | group-by column1)
} else {
(bash --login -c $"rvm use ($version); rvm gemset use --create ($gemset); env" | lines | split column "=" | group-by column1)
}
let old_env = $env.PATH | split row ":" | filter { not ($in | str contains "rvm") }
let new_env = $env_map.PATH.column2 | split row ":" | filter { $in | str contains "rvm" }
load-env {
RUBY_VERSION: ($env_map.RUBY_VERSION.column2 | first | str trim),
GEM_HOME: ($env_map.GEM_HOME.column2 | first | str trim),
GEM_PATH: ($env_map.GEM_PATH.column2 | first | str trim),
IRBRC: ($env_map.IRBRC.column2 | first | str trim),
MY_RUBY_HOME: ($env_map.MY_RUBY_HOME.column2 | first | str trim),
rvm_path: ($env_map.rvm_path.column2 | first | str trim),
PATH: ($old_env | prepend $new_env | uniq | str join ":"),
}
}
export def --env rvm-dir-hook [dir: string] {
let ruby_version_file = $"($dir)/.ruby-version"
let ruby_gemset_file = $"($dir)/.ruby-gemset"
if (file-exists $ruby_gemset_file) {
rvm-use (open $ruby_version_file | lines | get 0) (open $ruby_gemset_file | lines | get 0)
} else if (file-exists $ruby_version_file) {
rvm-use (open $ruby_version_file | lines | get 0) ""
}
}

View file

@ -3,7 +3,7 @@
" I don't accidentally start formatting when rebasing (bad memories).
function s:format_on_save()
if &filetype == 'fsharp' || &filetype == 'cs'
if &filetype == 'fsharp'
return execute('lua vim.lsp.buf.format()')
endif

View file

@ -51,6 +51,9 @@ table.insert(lint.linters.cspell.args, "--")
table.insert(lint.linters.cspell.args, "stdin")
lint.linters.eslint = eslint_linter
table.insert(lint.linters.eslint.args, 1, "--flag")
table.insert(lint.linters.eslint.args, 2, "unstable_ts_config")
lint.linters_by_ft = {}
if vim.fn.executable "phpcs" == 1 then

View file

@ -25,9 +25,9 @@ return {
-- Use a sexy terminal font with ligatures.
-- You will need to install the beta version of the font to get the ligatures
-- https://github.com/intel/intel-one-mono/issues/9#issuecomment-1994958719
font = wezterm.font {
family = "FiraCode Nerd Font Mono",
},
-- font = wezterm.font {
-- family = "FiraCode Nerd Font Mono",
-- },
-- -- The nord theme to fit with everyting else
color_scheme = "Poimandres",