mirror of
https://github.com/stevenproctor/dotfiles.git
synced 2026-01-28 12:49:56 -06:00
Compare commits
38 Commits
clojure_ma
...
44c4e29ebd
| Author | SHA1 | Date | |
|---|---|---|---|
| 44c4e29ebd | |||
| b08bb34014 | |||
| 7aee69c6cc | |||
| 00f9835648 | |||
| ada07b55ef | |||
| 1d0c8f99c0 | |||
| 40e12613f3 | |||
| 9aed0652fd | |||
| ceac258332 | |||
| da12dab7f0 | |||
| b580f52a16 | |||
| aa59abdc63 | |||
| 3bb3989d39 | |||
| 2ea5230362 | |||
|
|
022744ff0d | ||
|
|
76feada900 | ||
|
|
563b26b4c2 | ||
|
|
a64a75a550 | ||
|
|
6b95c42f3d | ||
|
|
267192615f | ||
|
|
139181de24 | ||
|
|
c304417d6c | ||
| 953cb4414b | |||
| 005efec7f6 | |||
| f434ee8946 | |||
|
|
d3d37c51c9 | ||
|
|
8c98d8cfd7 | ||
|
|
6e7f3533aa | ||
|
|
86ce07739a | ||
|
|
2d1d92d8a9 | ||
|
|
e09e7cf7a5 | ||
|
|
aa91648164 | ||
|
|
e4ac85922e | ||
|
|
629463b335 | ||
| 954340c183 | |||
|
|
86d29e0624 | ||
|
|
1b5e02d9b8 | ||
|
|
10c0d5b9e0 |
29
git/.gitconfig
Normal file
29
git/.gitconfig
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# This is Git's per-user configuration file.
|
||||||
|
[user]
|
||||||
|
email = steven.proctor@gmail.com
|
||||||
|
name = Proctor
|
||||||
|
|
||||||
|
[core]
|
||||||
|
editor = nvim
|
||||||
|
excludesFile = ~/.gitignore.global
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
||||||
|
|
||||||
|
[alias] ; Command aliases for the git[1] command wrapper
|
||||||
|
last = cat-file commit HEAD
|
||||||
|
[branch]
|
||||||
|
autoSetupRebase = always
|
||||||
|
[merge]
|
||||||
|
ff = only
|
||||||
|
[push]
|
||||||
|
autoSetupRemote = true
|
||||||
|
[rerere]
|
||||||
|
enabled = true
|
||||||
|
[remote]
|
||||||
|
pushDefault = origin
|
||||||
|
|
||||||
|
;; This is last, take in any other local file overrides
|
||||||
|
[include]
|
||||||
|
path = ~/.gitconfig.local ; find ".gitconfig.local" in your `$HOME` directory
|
||||||
|
[pull]
|
||||||
|
ff = only
|
||||||
@@ -21,6 +21,8 @@
|
|||||||
:false :⊥
|
:false :⊥
|
||||||
;; and
|
;; and
|
||||||
;; or
|
;; or
|
||||||
|
;; if-not
|
||||||
|
;; when-not
|
||||||
;; (not
|
;; (not
|
||||||
;; None | ∅
|
;; None | ∅
|
||||||
;; true, false | ⊤, ⊥ (top and bottom from logic)
|
;; true, false | ⊤, ⊥ (top and bottom from logic)
|
||||||
@@ -46,16 +48,18 @@
|
|||||||
(set nvim.wo.conceallevel 2)
|
(set nvim.wo.conceallevel 2)
|
||||||
(set nvim.wo.conceallevel 0)))
|
(set nvim.wo.conceallevel 0)))
|
||||||
|
|
||||||
|
;(setup-conceals)
|
||||||
|
;(toggle-conceal)
|
||||||
;(if true true false)
|
;(if true true false)
|
||||||
|
|
||||||
|
|
||||||
(nu.fn-bridge :ToggleConceal :dotfiles.conceal :toggle-conceal {:return false})
|
(nu.fn-bridge :ToggleConceal :dotfiles.conceal :toggle-conceal {:return false})
|
||||||
(nu.fn-bridge :SetupConceals :dotfiles.conceal :setup-conceals {:return false})
|
(nu.fn-bridge :SetupConceals :dotfiles.conceal :setup-conceals {:return false})
|
||||||
(u.nnoremap :<leader>ct "call ToggleConceal()")
|
(u.nnoremap :<leader>tc "call ToggleConceal()")
|
||||||
|
|
||||||
(def pretty-filetypes [:fennel
|
(def pretty-filetypes [:fennel
|
||||||
:clojure])
|
:clojure])
|
||||||
|
|
||||||
; (each [_ ftype (pairs pretty-filetypes)]
|
(each [_ ftype (pairs pretty-filetypes)]
|
||||||
; (nvim.ex.autocmd :FileType ftype :call "SetupConceals()"))
|
(nvim.ex.autocmd :FileType ftype :call "SetupConceals()"))
|
||||||
;
|
|
||||||
|
|||||||
@@ -19,8 +19,7 @@
|
|||||||
(if (not (a.empty? glob))
|
(if (not (a.empty? glob))
|
||||||
(nvim.ex.source filename))))
|
(nvim.ex.source filename))))
|
||||||
|
|
||||||
(a.map safe-source ["~/.vimrc" "~/.vimrc.local"])
|
; (a.map safe-source ["~/.vimrc" "~/.vimrc.local"])
|
||||||
|
|
||||||
|
|
||||||
(def- backup-dir (.. (nvim.fn.glob "$HOME") "/.vim/backup"))
|
(def- backup-dir (.. (nvim.fn.glob "$HOME") "/.vim/backup"))
|
||||||
(def- undo-dir (.. (nvim.fn.glob "$HOME") "/.vim/backup"))
|
(def- undo-dir (.. (nvim.fn.glob "$HOME") "/.vim/backup"))
|
||||||
@@ -61,10 +60,11 @@
|
|||||||
:background "dark"
|
:background "dark"
|
||||||
:backupdir backup-dir
|
:backupdir backup-dir
|
||||||
:directory backup-dir ;Don't clutter my dirs up with swp and tmp files
|
:directory backup-dir ;Don't clutter my dirs up with swp and tmp files
|
||||||
:grepprg "ag" ; Use Silver Searcher instead of grep
|
:grepprg "ag --vimgrep" ; Use Silver Searcher instead of grep
|
||||||
:tags "tags"
|
:tags "tags"
|
||||||
:updatetime 300 ; per coc.vim for diagnostic messages
|
:updatetime 300 ; per coc.vim for diagnostic messages
|
||||||
:signcolumn "auto:1-3"
|
:signcolumn "auto:1-3"
|
||||||
|
:colorcolumn [80 100]
|
||||||
:cmdheight 2 ; Better display for messages
|
:cmdheight 2 ; Better display for messages
|
||||||
:undodir undo-dir
|
:undodir undo-dir
|
||||||
:undolevels 1000
|
:undolevels 1000
|
||||||
@@ -76,8 +76,9 @@
|
|||||||
:tabstop 2
|
:tabstop 2
|
||||||
:shiftwidth 2
|
:shiftwidth 2
|
||||||
:softtabstop 2
|
:softtabstop 2
|
||||||
|
:mouse ""
|
||||||
:list true
|
:list true
|
||||||
:listchars "tab:➥\\ ,trail:·"
|
:listchars "tab:➥\\ ,trail:·,"
|
||||||
:backspace "indent,eol,start" ;allow backspacing over everything in insert mode
|
:backspace "indent,eol,start" ;allow backspacing over everything in insert mode
|
||||||
:wildmode "list:longest,list:full"
|
:wildmode "list:longest,list:full"
|
||||||
:wrap false
|
:wrap false
|
||||||
@@ -100,7 +101,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
(nvim.ex.autocmd "vimenter" "*" "++nested" "colorscheme" "solarized8")
|
;(nvim.ex.autocmd "vimenter" "*" "++nested" "colorscheme" "solarized8")
|
||||||
;(nvim.ex.autocmd "vimenter" "*" "luafile" "treesitter.lua")
|
;(nvim.ex.autocmd "vimenter" "*" "luafile" "treesitter.lua")
|
||||||
;
|
;
|
||||||
; (nvim.fn.glob "~/.vimrc.local")
|
; (nvim.fn.glob "~/.vimrc.local")
|
||||||
|
|||||||
@@ -5,11 +5,12 @@
|
|||||||
{nvim aniseed.nvim}})
|
{nvim aniseed.nvim}})
|
||||||
|
|
||||||
|
|
||||||
(require :dotfiles.plugins)
|
|
||||||
(require :dotfiles.core)
|
(require :dotfiles.core)
|
||||||
|
(require :dotfiles.plugins)
|
||||||
(require :dotfiles.mapping)
|
(require :dotfiles.mapping)
|
||||||
(require :dotfiles.conceal)
|
(require :dotfiles.conceal)
|
||||||
(require :dotfiles.zoom-toggle)
|
(require :dotfiles.zoom-toggle)
|
||||||
|
|
||||||
;(nvim.ex.source "~/.vimrc")
|
;(nvim.ex.source "~/.vimrc")
|
||||||
|
|
||||||
|
(a.println "(re)loaded")
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
(module dotfiles.mapping
|
(module dotfiles.mapping
|
||||||
{autoload {nvim aniseed.nvim
|
{autoload {nvim aniseed.nvim
|
||||||
nu aniseed.nvim.util
|
nu aniseed.nvim.util
|
||||||
core aniseed.core}})
|
core aniseed.core
|
||||||
|
util dotfiles.util
|
||||||
|
}})
|
||||||
|
|
||||||
(defn- noremap [mode from to]
|
(defn- noremap [mode from to]
|
||||||
"Sets a mapping with {:noremap true}."
|
"Sets a mapping with {:noremap true}."
|
||||||
|
|||||||
@@ -13,9 +13,12 @@
|
|||||||
|
|
||||||
(def- cmp-srcs
|
(def- cmp-srcs
|
||||||
[{:name :nvim_lsp}
|
[{:name :nvim_lsp}
|
||||||
|
{:name :nvim_lua}
|
||||||
{:name :vsnip}
|
{:name :vsnip}
|
||||||
{:name :conjure}
|
{:name :conjure}
|
||||||
{:name :buffer}])
|
{:name :buffer}
|
||||||
|
{:name :orgmode}
|
||||||
|
{:name :emoji :max_item_count 8}])
|
||||||
|
|
||||||
;; Setup cmp with desired settings
|
;; Setup cmp with desired settings
|
||||||
(let [cmp (require :cmp)]
|
(let [cmp (require :cmp)]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
(module dotfiles.plugin.colorizer
|
(module dotfiles.plugin.colorizer
|
||||||
{autoload {colorizer colorizer}})
|
{autoload {colorizer colorizer}})
|
||||||
|
|
||||||
(colorizer.setup {"*" {}}
|
(colorizer.setup [:*]
|
||||||
{:RGB true ; #RGB hex codes, like #F00
|
{:RGB true ; #RGB hex codes, like #F00
|
||||||
:RRGGBB true ; #RRGGBB hex codes, like #00FF00
|
:RRGGBB true ; #RRGGBB hex codes, like #00FF00
|
||||||
:names true ; "Name" codes like Blue
|
:names true ; "Name" codes like Blue
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
:nvim_lsp true
|
:nvim_lsp true
|
||||||
:nvim_lua true
|
:nvim_lua true
|
||||||
:conjure true
|
:conjure true
|
||||||
|
:orgmode true
|
||||||
:vsnip true
|
:vsnip true
|
||||||
:vim_dadbod_completion true}})))
|
:vim_dadbod_completion true}})))
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
; (set nvim.g.conjure#eval#result_register "*")
|
; (set nvim.g.conjure#eval#result_register "*")
|
||||||
; (set nvim.g.conjure#log#botright true)
|
; (set nvim.g.conjure#log#botright true)
|
||||||
(set nvim.g.conjure#mapping#doc_word "gk")
|
(set nvim.g.conjure#mapping#doc_word "gk")
|
||||||
|
(set nvim.g.conjure#client#clojure#nrepl#mapping#session_clone :sC)
|
||||||
(set nvim.g.conjure#extract#tree_sitter#enabled true)
|
(set nvim.g.conjure#extract#tree_sitter#enabled true)
|
||||||
|
|
||||||
(conjure-config.assoc-in [:filetypes] (a.concat (conjure-config.filetypes) [:markdown] ))
|
(conjure-config.assoc-in [:filetypes] (a.concat (conjure-config.filetypes) [:markdown] ))
|
||||||
|
|||||||
9
nvim/.config/nvim/fnl/dotfiles/plugin/fugitive.fnl
Normal file
9
nvim/.config/nvim/fnl/dotfiles/plugin/fugitive.fnl
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
(module dotfiles.plugin.fugitive
|
||||||
|
{autoload {nvim aniseed.nvim
|
||||||
|
nu aniseed.nvim.util
|
||||||
|
core aniseed.core
|
||||||
|
util dotfiles.util}})
|
||||||
|
|
||||||
|
(nvim.ex.autocmd :FileType :fugitive :nmap :<buffer> :<leader>gp ":Git pull<CR>")
|
||||||
|
;; Determine load time of fugitive
|
||||||
|
(nvim.ex.autocmd :FileType :fugitive :nmap :<buffer> :<leader>gP ":Git push<CR>" )
|
||||||
2
nvim/.config/nvim/fnl/dotfiles/plugin/headlines.fnl
Normal file
2
nvim/.config/nvim/fnl/dotfiles/plugin/headlines.fnl
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
(module dotfiles.plugin.headlines
|
||||||
|
{autoload {headlines headlines}})
|
||||||
@@ -1,41 +1,31 @@
|
|||||||
(module dotfiles.plugin.lspconfig
|
(module dotfiles.plugin.lspconfig
|
||||||
{autoload
|
{autoload {a aniseed.core
|
||||||
{a aniseed.core
|
|
||||||
u dotfiles.util
|
u dotfiles.util
|
||||||
nvim aniseed.nvim
|
nvim aniseed.nvim
|
||||||
nu aniseed.nvim.util
|
nu aniseed.nvim.util}})
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
(defn bufmap [mode from to]
|
(defn bufmap [mode from to] (u.noremap mode from to {:local? true}))
|
||||||
(u.noremap mode from to {:local? true}))
|
|
||||||
|
|
||||||
(defn nbufmap [from to]
|
(defn nbufmap [from to] (bufmap :n from to))
|
||||||
(bufmap :n from to))
|
|
||||||
|
|
||||||
(defn xbufmap [from to]
|
|
||||||
(bufmap :x from to))
|
|
||||||
|
|
||||||
|
(defn xbufmap [from to] (bufmap :x from to))
|
||||||
|
|
||||||
(defn define-sign [level sign]
|
(defn define-sign [level sign]
|
||||||
(let [sign-level (.. "DiagnosticSign" level)]
|
(let [sign-level (.. :DiagnosticSign level)]
|
||||||
(nvim.fn.sign_define sign-level
|
(nvim.fn.sign_define sign-level
|
||||||
{:texthl sign-level
|
{:texthl sign-level :text sign :numhl sign-level})))
|
||||||
:text sign
|
|
||||||
:numhl sign-level})))
|
|
||||||
|
|
||||||
; (define-sign :Error "☢️")
|
; (define-sign :Error "☢️")
|
||||||
; (define-sign :Warn "⚠️")
|
; (define-sign :Warn "⚠️")
|
||||||
; (define-sign :SignHint "🔎")
|
; (define-sign :SignHint "🔎")
|
||||||
; (define-sign :Info "ℹ️")
|
; (define-sign :Info "ℹ️")
|
||||||
(define-sign :Error "X")
|
(define-sign :Error :X)
|
||||||
(define-sign :Warn "!")
|
(define-sign :Warn "!")
|
||||||
(define-sign :SignHint "?")
|
(define-sign :SignHint "?")
|
||||||
(define-sign :Info "i")
|
(define-sign :Info :i)
|
||||||
|
|
||||||
(def core-nmappings
|
(def core-nmappings
|
||||||
{
|
{:gd "lua vim.lsp.buf.definition()"
|
||||||
:gd "lua vim.lsp.buf.definition()"
|
|
||||||
:gD "lua vim.lsp.buf.declaration()"
|
:gD "lua vim.lsp.buf.declaration()"
|
||||||
:gi "lua vim.lsp.buf.implementation()"
|
:gi "lua vim.lsp.buf.implementation()"
|
||||||
:gr "lua vim.lsp.buf.references()"
|
:gr "lua vim.lsp.buf.references()"
|
||||||
@@ -46,62 +36,94 @@
|
|||||||
:<leader>ca "lua vim.lsp.buf.code_action()"
|
:<leader>ca "lua vim.lsp.buf.code_action()"
|
||||||
:<leader>cl "lua vim.lsp.codelens.run()"
|
:<leader>cl "lua vim.lsp.codelens.run()"
|
||||||
:<leader>ic "lua vim.lsp.buf.incoming_calls()"
|
:<leader>ic "lua vim.lsp.buf.incoming_calls()"
|
||||||
:<leader>oc "lua vim.lsp.buf.outgoing_calls()"
|
;; TODO: think of new mapping; conficts with org mode
|
||||||
|
;; :<leader>oc "lua vim.lsp.buf.outgoing_calls()"
|
||||||
:<leader>sld "lua vim.diagnostic.open_float(nil, {source = 'always'})"
|
:<leader>sld "lua vim.diagnostic.open_float(nil, {source = 'always'})"
|
||||||
:<leader>rn "lua vim.lsp.buf.rename()"
|
:<leader>rn "lua vim.lsp.buf.rename()"
|
||||||
:<leader>fa "lua vim.lsp.buf.formatting_sync()"
|
:<leader>fa "lua vim.lsp.buf.format()"})
|
||||||
})
|
|
||||||
|
|
||||||
(def client-nmappings
|
(def client-nmappings
|
||||||
{:clojure_lsp
|
{:clojure_lsp {:<leader>cn "call LspExecuteCommand('clean-ns')"
|
||||||
{
|
|
||||||
:<leader>cn "call LspExecuteCommand('clean-ns')"
|
|
||||||
:<leader>ref "call LspExecuteCommand('extract-function', input('Function name: '))"
|
:<leader>ref "call LspExecuteCommand('extract-function', input('Function name: '))"
|
||||||
:<leader>id "call LspExecuteCommand('inline-symbol')"
|
:<leader>id "call LspExecuteCommand('inline-symbol')"
|
||||||
:<leader>il "call LspExecuteCommand('introduce-let', input('Binding name: '))"
|
:<leader>il "call LspExecuteCommand('introduce-let', input('Binding name: '))"
|
||||||
:<leader>m2l "call LspExecuteCommand('move-to-let', input('Binding name: '))"
|
:<leader>m2l "call LspExecuteCommand('move-to-let', input('Binding name: '))"}})
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
(def client-command-lnmappings
|
||||||
|
{:clojure_lsp {:ai [:add-import-to-namespace
|
||||||
|
["input('Namespace name: ')"]]
|
||||||
|
:am [:add-missing-libspec []]
|
||||||
|
:as [:add-require-suggestion
|
||||||
|
["input('Namespace name: ')"
|
||||||
|
"input('Namespace as: ')"
|
||||||
|
"input('Namespace name: ')"]]
|
||||||
|
:cc [:cycle-coll []]
|
||||||
|
:cn [:clean-ns []]
|
||||||
|
:cp [:cycle-privacy []]
|
||||||
|
:ct [:create-test []]
|
||||||
|
:df [:drag-forward []]
|
||||||
|
:db [:drag-backward []]
|
||||||
|
:df [:drag-forward []]
|
||||||
|
:dk [:destructure-keys []]
|
||||||
|
:ed [:extract-to-def ["input('Definition name: ')"]]
|
||||||
|
:ef [:extract-function ["input('Function name: ')"]]
|
||||||
|
:el [:expand-let []]
|
||||||
|
:fe [:create-function []]
|
||||||
|
:il [:introduce-let ["input('Binding name: ')"]]
|
||||||
|
:is [:inline-symbol []]
|
||||||
|
:ma [:resolve-macro-as []]
|
||||||
|
:mf [:move-form ["input('File name: ')"]]
|
||||||
|
:ml [:move-to-let ["input('Binding name: ')"]]
|
||||||
|
:pf [:promote-fn ["input('Function name: ')"]]
|
||||||
|
:sc [:change-collection ["input('Collection type: ')"]]
|
||||||
|
:sm [:sort-map []]
|
||||||
|
:tf [:thread-first-all []]
|
||||||
|
:tF [:thread-first []]
|
||||||
|
:tl [:thread-last-all []]
|
||||||
|
:tL [:thread-last []]
|
||||||
|
:ua [:unwind-all []]
|
||||||
|
:uw [:unwind-thread []]}})
|
||||||
|
|
||||||
(defn bind-client-mappings [client]
|
(defn bind-client-mappings [client]
|
||||||
(let [client-name (a.get client :name)
|
(let [client-name (a.get client :name)
|
||||||
mappings (a.get client-nmappings client-name)]
|
mappings (a.get client-nmappings client-name)
|
||||||
|
command-lnmappings (a.get client-command-lnmappings client-name)]
|
||||||
(when mappings
|
(when mappings
|
||||||
(each [mapping cmd (pairs mappings)]
|
(each [mapping cmd (pairs mappings)]
|
||||||
(nbufmap mapping cmd)))))
|
(nbufmap mapping cmd)))
|
||||||
|
(when command-lnmappings
|
||||||
|
(each [lnmapping command-mapping (pairs command-lnmappings)]
|
||||||
|
(let [lsp-cmd (a.first command-mapping)
|
||||||
|
opts-str (accumulate [s "" i opt (ipairs (a.second command-mapping))]
|
||||||
|
(.. s ", " opt))
|
||||||
|
mapping (.. :<leader> lnmapping)
|
||||||
|
cmd (.. "call LspExecuteCommand('" lsp-cmd "'" opts-str ")")]
|
||||||
|
(nbufmap mapping cmd))))))
|
||||||
|
|
||||||
(defn on_attach [client bufnr]
|
(defn on_attach [client bufnr]
|
||||||
(each [mapping cmd (pairs core-nmappings)]
|
(each [mapping cmd (pairs core-nmappings)]
|
||||||
(nbufmap mapping cmd))
|
(nbufmap mapping cmd)) ; x mode mappings
|
||||||
|
(xbufmap :<leader>fa "lua vim.lsp.buf.format()")
|
||||||
; x mode mappings
|
; -- buf_set_keymap('n', 'gs', '<Cmd>lua vim.lsp.buf.document_symbol()<CR>', opts)
|
||||||
(xbufmap :<leader>fa "lua vim.lsp.buf.formatting_sync()")
|
; -- buf_set_keymap('n', 'gS', '<Cmd>lua vim.lsp.buf.workspace_symbol()<CR>', opts)
|
||||||
|
; -- buf_set_keymap('n', 'gt', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||||
; -- buf_set_keymap('n', 'gs', '<Cmd>lua vim.lsp.buf.document_symbol()<CR>', opts)
|
; -- buf_set_keymap('n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
||||||
; -- buf_set_keymap('n', 'gS', '<Cmd>lua vim.lsp.buf.workspace_symbol()<CR>', opts)
|
; -- buf_set_keymap('n', '<leader>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
||||||
; -- buf_set_keymap('n', 'gt', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
; -- buf_set_keymap('n', '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
||||||
; -- buf_set_keymap('n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
; -- buf_set_keymap('n', '<leader>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||||
; -- buf_set_keymap('n', '<leader>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
; -- buf_set_keymap('n', '<leader>ic', "<cmd>lua vim.lsp.buf.incoming_calls()<CR>", opts)
|
||||||
; -- buf_set_keymap('n', '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
; -- buf_set_keymap('x', '<leader>ic', "<cmd>lua vim.lsp.buf.incoming_calls()<CR>", opts)
|
||||||
; -- buf_set_keymap('n', '<leader>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
|
||||||
; -- buf_set_keymap('n', '<leader>ic', "<cmd>lua vim.lsp.buf.incoming_calls()<CR>", opts)
|
|
||||||
; -- buf_set_keymap('x', '<leader>ic', "<cmd>lua vim.lsp.buf.incoming_calls()<CR>", opts)
|
|
||||||
|
|
||||||
(nvim.buf_set_option 0 :omnifunc "v:lua.vim.lsp.omnifunc")
|
(nvim.buf_set_option 0 :omnifunc "v:lua.vim.lsp.omnifunc")
|
||||||
|
|
||||||
(bind-client-mappings client)
|
(bind-client-mappings client)
|
||||||
(nvim.ex.autocmd :BufWritePre :<buffer> :lua "vim.lsp.buf.formatting_sync()")
|
(nvim.ex.autocmd :BufWritePre :<buffer> :lua
|
||||||
; (nvim.ex.autocmd "BufEnter,CursorHold,InsertLeave" :<buffer> :lua "vim.lsp.codelens.refresh()")
|
"vim.lsp.buf.formatting_sync()")
|
||||||
|
; (nvim.ex.autocmd "BufEnter,CursorHold,InsertLeave" :<buffer> :lua "vim.lsp.codelens.refresh()")
|
||||||
; client autocmds
|
; client autocmds
|
||||||
; -- vim.api.nvim_command[[autocmd BufWritePre <buffer> lua vim.lsp.buf_request_sync(vim.api.nvim_get_current_buf(), 'workspace/executeCommand', {command = 'clean-ns', arguments = {vim.uri_from_bufnr(1), vim.api.nvim_win_get_cursor(0)[1], vim.api.nvim_win_get_cursor(0)[2]}, title = 'Clean Namespace'})]]
|
; -- vim.api.nvim_command[[autocmd BufWritePre <buffer> lua vim.lsp.buf_request_sync(vim.api.nvim_get_current_buf(), 'workspace/executeCommand', {command = 'clean-ns', arguments = {vim.uri_from_bufnr(1), vim.api.nvim_win_get_cursor(0)[1], vim.api.nvim_win_get_cursor(0)[2]}, title = 'Clean Namespace'})]]
|
||||||
|
|
||||||
(print "LSP Client Attached."))
|
(print "LSP Client Attached."))
|
||||||
|
|
||||||
(let [lspi (require :nvim-lsp-installer)]
|
(let [lspi (require :nvim-lsp-installer)]
|
||||||
(when lspi
|
(when lspi
|
||||||
|
|
||||||
(defn lsp-execute-command [cmd ...]
|
(defn lsp-execute-command [cmd ...]
|
||||||
(let [buf-uri (vim.uri_from_bufnr 0)
|
(let [buf-uri (vim.uri_from_bufnr 0)
|
||||||
cursor (vim.api.nvim_win_get_cursor 0)
|
cursor (vim.api.nvim_win_get_cursor 0)
|
||||||
@@ -109,26 +131,26 @@
|
|||||||
c (a.second cursor)
|
c (a.second cursor)
|
||||||
opts [buf-uri r c]
|
opts [buf-uri r c]
|
||||||
args (a.concat opts [...])]
|
args (a.concat opts [...])]
|
||||||
(vim.lsp.buf.execute_command {:command cmd
|
(vim.lsp.buf.execute_command {:command cmd :arguments args})))
|
||||||
:arguments args})))
|
|
||||||
|
|
||||||
(defn setup-servers []
|
(defn setup-servers []
|
||||||
(lspi.on_server_ready (fn [server]
|
(lspi.on_server_ready (fn [server]
|
||||||
(let [opts {:on_attach on_attach :flags {:debounce_text_changes 150} }]
|
(let [opts {: on_attach
|
||||||
|
:flags {:debounce_text_changes 150}}]
|
||||||
(server:setup opts))))
|
(server:setup opts))))
|
||||||
;; (let [lspconfig (require :lspconfig)
|
;; (let [lspconfig (require :lspconfig)
|
||||||
;; servers (lspi.get_installed_servers)]
|
;; servers (lspi.get_installed_servers)]
|
||||||
;; (each [_ server (pairs servers)]
|
;; (each [_ server (pairs servers)]
|
||||||
;; (server.setup {:on_attach on_attach :flags {:debounce_text_changes 150} })))
|
;; (server.setup {:on_attach on_attach :flags {:debounce_text_changes 150} })))
|
||||||
)
|
)
|
||||||
|
(defn on-post-install [] (setup-servers) (nvim.ex.bufdo :e))
|
||||||
(defn on-post-install []
|
|
||||||
(setup-servers)
|
(setup-servers)
|
||||||
(nvim.ex.bufdo :e))
|
|
||||||
|
|
||||||
(setup-servers)
|
|
||||||
|
|
||||||
(set lspi.post_install_hook on-post-install)
|
(set lspi.post_install_hook on-post-install)
|
||||||
(nu.fn-bridge :LspExecuteCommand :dotfiles.plugin.lspconfig :lsp-execute-command {:return false})
|
(nu.fn-bridge :LspExecuteCommand :dotfiles.plugin.lspconfig
|
||||||
|
:lsp-execute-command {:return false})
|
||||||
|
(u.nnoremap :<leader>li :LspInfo)))
|
||||||
|
|
||||||
(u.nnoremap :<leader>li "LspInfo")))
|
(comment (let [lspi (require :nvim-lsp-installer)
|
||||||
|
;lspconfig (require :lspconfig)
|
||||||
|
servers (lspi.get_installed_servers)]
|
||||||
|
(each [_ server (pairs servers)]
|
||||||
|
(a.pr server))))
|
||||||
|
|||||||
13
nvim/.config/nvim/fnl/dotfiles/plugin/null-ls.fnl
Normal file
13
nvim/.config/nvim/fnl/dotfiles/plugin/null-ls.fnl
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
(module dotfiles.plugin.null-ls
|
||||||
|
{autoload {nvim aniseed.nvim
|
||||||
|
a aniseed.core
|
||||||
|
nu aniseed.nvim.util
|
||||||
|
null-ls null-ls
|
||||||
|
lspconfig dotfiles.plugin.lspconfig}})
|
||||||
|
|
||||||
|
(def null-ls-server-options
|
||||||
|
{:sources [null-ls.builtins.formatting.stylua
|
||||||
|
null-ls.builtins.formatting.fnlfmt]
|
||||||
|
:on_attach lspconfig.on_attach})
|
||||||
|
|
||||||
|
(null-ls.setup null-ls-server-options)
|
||||||
3
nvim/.config/nvim/fnl/dotfiles/plugin/orgbullets.fnl
Normal file
3
nvim/.config/nvim/fnl/dotfiles/plugin/orgbullets.fnl
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
(module dotfiles.plugin.orgbullets
|
||||||
|
{autoload {org-bullets org-bullets}})
|
||||||
|
|
||||||
8
nvim/.config/nvim/fnl/dotfiles/plugin/orgmode.fnl
Normal file
8
nvim/.config/nvim/fnl/dotfiles/plugin/orgmode.fnl
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
(module dotfiles.plugin.orgmode
|
||||||
|
{autoload {orgmode orgmode}})
|
||||||
|
|
||||||
|
(orgmode.setup_ts_grammar)
|
||||||
|
|
||||||
|
(orgmode.setup
|
||||||
|
{:org_agenda_files ["~/Dropbox/org/*" "~/my-orgs/**/*"]
|
||||||
|
:org_default_notes_file "~/Dropbox/org/refile.org" })
|
||||||
76
nvim/.config/nvim/fnl/dotfiles/plugin/paredit.fnl
Normal file
76
nvim/.config/nvim/fnl/dotfiles/plugin/paredit.fnl
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
(module dotfiles.plugin.paredit
|
||||||
|
{autoload {nvim aniseed.nvim
|
||||||
|
a aniseed.core
|
||||||
|
nu aniseed.nvim.util
|
||||||
|
paredit paredit
|
||||||
|
ts-parsers nvim-treesitter.parsers
|
||||||
|
ts-utils nvim-treesitter.ts_utils
|
||||||
|
languagetree vim.treesitter.languagetree
|
||||||
|
}})
|
||||||
|
|
||||||
|
(defn list-member? [xs x]
|
||||||
|
(a.some #(= x $1) (a.vals xs)))
|
||||||
|
|
||||||
|
(defn bool->int [bool]
|
||||||
|
(if bool 1 0))
|
||||||
|
|
||||||
|
(defn language-at-cursor []
|
||||||
|
(let [parser (ts-parsers.get_parser)
|
||||||
|
current-node (ts-utils.get_node_at_cursor)
|
||||||
|
range (if current-node
|
||||||
|
[(current-node:range)])
|
||||||
|
lang (if range
|
||||||
|
(languagetree.language_for_range parser range))]
|
||||||
|
(if lang
|
||||||
|
(lang:lang))))
|
||||||
|
|
||||||
|
(defn parser-language []
|
||||||
|
(let [parser (ts-parsers.get_parser)]
|
||||||
|
(when parser
|
||||||
|
(parser:lang))))
|
||||||
|
|
||||||
|
(def- paredit-langs
|
||||||
|
[
|
||||||
|
:clojure
|
||||||
|
:fennel
|
||||||
|
:hy
|
||||||
|
:janet
|
||||||
|
:julia
|
||||||
|
:lfe
|
||||||
|
:lisp
|
||||||
|
:racket
|
||||||
|
:scheme
|
||||||
|
:shen
|
||||||
|
])
|
||||||
|
|
||||||
|
(def- paredit-host-langs
|
||||||
|
[
|
||||||
|
:org
|
||||||
|
:markdown
|
||||||
|
:asciidoc
|
||||||
|
])
|
||||||
|
|
||||||
|
(defn- host-lang-in? [langs]
|
||||||
|
(list-member? langs (parser-language)))
|
||||||
|
|
||||||
|
(defn paredit-lang? [lang]
|
||||||
|
(list-member? paredit-langs lang))
|
||||||
|
|
||||||
|
(defn TreeSitterLangParedit []
|
||||||
|
(when (host-lang-in? paredit-host-langs)
|
||||||
|
(when-let [cursor-lang (language-at-cursor)]
|
||||||
|
(->> cursor-lang
|
||||||
|
(paredit-lang?)
|
||||||
|
(bool->int)
|
||||||
|
(set nvim.g.paredit_mode))
|
||||||
|
(nvim.fn.PareditInitBuffer))))
|
||||||
|
|
||||||
|
; (nvim.del_augroup_by_name "BabeliteParedit")
|
||||||
|
; (nvim.get_autocmds {:group "BabeliteParedit"})
|
||||||
|
|
||||||
|
(let [group (nvim.create_augroup "BabeliteParedit" {:clear true})]
|
||||||
|
(nvim.create_autocmd ["CursorHold" "CursorMoved"]
|
||||||
|
{:group group
|
||||||
|
;:pattern ["*.org" "*.md"]
|
||||||
|
:callback TreeSitterLangParedit}))
|
||||||
|
|
||||||
@@ -1,9 +1,15 @@
|
|||||||
(module dotfiles.plugin.treesitter
|
(module dotfiles.plugin.treesitter
|
||||||
{autoload {treesitter nvim-treesitter.configs}})
|
{autoload {treesitter nvim-treesitter
|
||||||
|
ts_utils nvim-treesitter.ts_utils
|
||||||
|
treesitter-configs nvim-treesitter.configs}})
|
||||||
|
|
||||||
(treesitter.setup
|
(treesitter-configs.setup
|
||||||
{:highlight {:enable true
|
{:highlight {:enable true
|
||||||
:additional_vim_regex_highlighting false}
|
;; :additional_vim_regex_highlighting false
|
||||||
|
:additional_vim_regex_highlighting [:org]
|
||||||
|
}
|
||||||
|
|
||||||
|
:ensure_installed :all ; [:org]
|
||||||
|
|
||||||
:rainbow {:enable true
|
:rainbow {:enable true
|
||||||
:extended_mode true ; Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
:extended_mode true ; Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
||||||
@@ -19,3 +25,5 @@
|
|||||||
] ; table of hex strings
|
] ; table of hex strings
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
; lua print(require('nvim-treesitter.parsers').get_parser():language_for_range({ require('nvim-treesitter.ts_utils').get_node_at_cursor():range() }):lang())
|
||||||
|
|||||||
5
nvim/.config/nvim/fnl/dotfiles/plugin/whichkey.fnl
Normal file
5
nvim/.config/nvim/fnl/dotfiles/plugin/whichkey.fnl
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
(module dotfiles.plugin.whichkey
|
||||||
|
{autoload {which-key which-key}})
|
||||||
|
|
||||||
|
(which-key.setup {})
|
||||||
|
|
||||||
@@ -2,9 +2,7 @@
|
|||||||
{autoload {nvim aniseed.nvim
|
{autoload {nvim aniseed.nvim
|
||||||
a aniseed.core
|
a aniseed.core
|
||||||
;; util dotfiles.util
|
;; util dotfiles.util
|
||||||
packer packer
|
packer packer}
|
||||||
|
|
||||||
}
|
|
||||||
;; require {minpac minpac}
|
;; require {minpac minpac}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -33,11 +31,17 @@
|
|||||||
:Olical/fennel.vim {} ; Fennel
|
:Olical/fennel.vim {} ; Fennel
|
||||||
:airblade/vim-gitgutter {} ; Git
|
:airblade/vim-gitgutter {} ; Git
|
||||||
:airblade/vim-gitgutter {} ; Git
|
:airblade/vim-gitgutter {} ; Git
|
||||||
|
:akinsho/org-bullets.nvim {:mod :orgbullets}
|
||||||
:clojure-vim/vim-jack-in {} ; Conjure support - jack-in with nrepl dependencies
|
:clojure-vim/vim-jack-in {} ; Conjure support - jack-in with nrepl dependencies
|
||||||
|
:dhruvasagar/vim-table-mode {} ; table creation and formatting
|
||||||
:folke/lsp-colors.nvim {}
|
:folke/lsp-colors.nvim {}
|
||||||
|
:folke/which-key.nvim {:mod :whichkey}
|
||||||
:hashivim/vim-terraform {} ; Terraform
|
:hashivim/vim-terraform {} ; Terraform
|
||||||
:hrsh7th/nvim-cmp {:requires [:hrsh7th/cmp-buffer
|
:hrsh7th/nvim-cmp {:requires [:hrsh7th/cmp-buffer
|
||||||
|
:hrsh7th/cmp-emoji
|
||||||
:hrsh7th/cmp-nvim-lsp
|
:hrsh7th/cmp-nvim-lsp
|
||||||
|
:hrsh7th/cmp-nvim-lua
|
||||||
|
:hrsh7th/cmp-path
|
||||||
:hrsh7th/cmp-vsnip
|
:hrsh7th/cmp-vsnip
|
||||||
:hrsh7th/vim-vsnip-integ
|
:hrsh7th/vim-vsnip-integ
|
||||||
:PaterJason/cmp-conjure]
|
:PaterJason/cmp-conjure]
|
||||||
@@ -46,21 +50,27 @@
|
|||||||
:hrsh7th/vim-vsnip-integ {}
|
:hrsh7th/vim-vsnip-integ {}
|
||||||
:Iron-E/nvim-soluarized {}
|
:Iron-E/nvim-soluarized {}
|
||||||
:jiangmiao/auto-pairs {} ; backets, parens, and quotes in pairs
|
:jiangmiao/auto-pairs {} ; backets, parens, and quotes in pairs
|
||||||
|
:jose-elias-alvarez/null-ls.nvim {:mod :null-ls
|
||||||
|
:requires [:nvim-lua/plenary.nvim]}
|
||||||
:junegunn/vim-easy-align {:mod :easyalign}
|
:junegunn/vim-easy-align {:mod :easyalign}
|
||||||
:kovisoft/paredit {}
|
:kovisoft/paredit {:mod :paredit}
|
||||||
:kristijanhusak/vim-dadbod-completion {}
|
:kristijanhusak/vim-dadbod-completion {}
|
||||||
:kristijanhusak/vim-dadbod-ui {}
|
:kristijanhusak/vim-dadbod-ui {}
|
||||||
|
:lukas-reineke/headlines.nvim {:mod :headlines}
|
||||||
|
; :michaelb/sniprun {:run "bash ./install.sh" :mod :sniprun}
|
||||||
:neovim/nvim-lspconfig {:mod :lspconfig} ; NeoVim lsp config
|
:neovim/nvim-lspconfig {:mod :lspconfig} ; NeoVim lsp config
|
||||||
:norcalli/nvim-colorizer.lua {:mode :colorizer}
|
:norcalli/nvim-colorizer.lua {:mod :colorizer}
|
||||||
|
:nvim-orgmode/orgmode { :mod :orgmode }
|
||||||
:nvim-telescope/telescope.nvim {:requires [[:nvim-lua/popup.nvim] [:nvim-lua/plenary.nvim]] :mod :telescope}
|
:nvim-telescope/telescope.nvim {:requires [[:nvim-lua/popup.nvim] [:nvim-lua/plenary.nvim]] :mod :telescope}
|
||||||
:nvim-treesitter/nvim-treesitter {:run ":TSUpdate" :mod :treesitter}
|
:nvim-treesitter/nvim-treesitter {:run ":TSUpdate" :mod :treesitter}
|
||||||
|
:nvim-treesitter/playground {}
|
||||||
:p00f/nvim-ts-rainbow {}
|
:p00f/nvim-ts-rainbow {}
|
||||||
:radenling/vim-dispatch-neovim {} ; Clojure
|
:radenling/vim-dispatch-neovim {} ; Clojure
|
||||||
:skywind3000/asyncrun.vim {} ; :AsyncRun
|
:skywind3000/asyncrun.vim {} ; :AsyncRun
|
||||||
:tpope/vim-classpath {}
|
:tpope/vim-classpath {}
|
||||||
:tpope/vim-dadbod {}
|
:tpope/vim-dadbod {}
|
||||||
:tpope/vim-dispatch {} ; Conjure support - jack-in with nrepl dependencies
|
:tpope/vim-dispatch {} ; Conjure support - jack-in with nrepl dependencies
|
||||||
:tpope/vim-fugitive {} ; Git
|
:tpope/vim-fugitive {:mod :fugitive} ; Git
|
||||||
:tpope/vim-git {} ; Git Commit Message
|
:tpope/vim-git {} ; Git Commit Message
|
||||||
:tpope/vim-pathogen {}
|
:tpope/vim-pathogen {}
|
||||||
:tpope/vim-rails {}
|
:tpope/vim-rails {}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ setw -g mouse off
|
|||||||
# set -g default-terminal "xterm-256:color"
|
# set -g default-terminal "xterm-256:color"
|
||||||
# set -g default-terminal "${TERM}"
|
# set -g default-terminal "${TERM}"
|
||||||
set -s default-terminal "tmux-256color"
|
set -s default-terminal "tmux-256color"
|
||||||
set -g history-limit 6000
|
set -g history-limit 15000
|
||||||
|
|
||||||
set -g window-status-style dim
|
set -g window-status-style dim
|
||||||
set -g window-status-current-style bright
|
set -g window-status-current-style bright
|
||||||
@@ -46,8 +46,9 @@ set -g status-right '#(~/dotfiles/bin/tmux_battery_charge_indicator.sh) #[bg=whi
|
|||||||
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
|
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
|
||||||
set-environment -g 'SSH_AUTH_SOCK' ~/.ssh/ssh_auth_sock
|
set-environment -g 'SSH_AUTH_SOCK' ~/.ssh/ssh_auth_sock
|
||||||
|
|
||||||
# set -as terminal-overrides ',xterm-257color:RGB'
|
# set -as terminal-overrides ',xterm-256color:RGB'
|
||||||
set -as terminal-features ',xterm-256color:RGB'
|
set -as terminal-features ',xterm-256color:RGB'
|
||||||
|
set-option -sa terminal-overrides ',xterm-256color:RGB'
|
||||||
|
|
||||||
# Undercurl
|
# Undercurl
|
||||||
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
|
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
|
||||||
|
|||||||
Reference in New Issue
Block a user