Another bunch of changes

emacs: update init.el following upstream
neovim: add conjure, update packer call for nvim-cmp
This commit is contained in:
FollieHiyuki 2021-09-24 01:12:21 +07:00
parent 2a62792e2b
commit e9cdccb8a8
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
6 changed files with 47 additions and 40 deletions

View File

@ -29,6 +29,7 @@
+prescient +prescient
;;+childframe ;;+childframe
+icons) +icons)
;;vertico ; the search engine of the future
:ui :ui
;;deft ; notational velocity for Emacs ;;deft ; notational velocity for Emacs
@ -39,7 +40,6 @@
+unicode +unicode
+ascii +ascii
+github) +github)
;;fill-column ; a `fill-column' indicator
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra ;;hydra
indent-guides ; highlighted indent columns indent-guides ; highlighted indent columns
@ -71,7 +71,7 @@
;;lispy ; vim for lisp, for people who don't like vim ;;lispy ; vim for lisp, for people who don't like vim
multiple-cursors ; editing in many places at once multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent ;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of ;;(parinfer +rust) ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates ;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent ;;word-wrap ; soft wrapping with language-aware indent
@ -139,6 +139,7 @@
;;csharp ; unity, .NET, and mono shenanigans ;;csharp ; unity, .NET, and mono shenanigans
data ; config/data formats data ; config/data formats
;;(dart +flutter) ; paint ui and not much else ;;(dart +flutter) ; paint ui and not much else
;;dhall
;;elixir ; erlang done right ;;elixir ; erlang done right
;;elm ; care for a cup of TEA? ;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses emacs-lisp ; drown in parentheses
@ -163,8 +164,8 @@
+cdlatex +cdlatex
+lsp +lsp
+fold) +fold)
;;lean ;;lean ; for folks with too much to prove
;;ledger ; an accounting system in Emacs ;;ledger ; be audit you can be
(lua ; one-based indices? one-based indices (lua ; one-based indices? one-based indices
+moonscript +moonscript
+lsp) +lsp)

View File

@ -115,6 +115,7 @@ function M.cmp_conf()
{name = 'spell'}, {name = 'spell'},
{name = 'emoji'}, {name = 'emoji'},
{name = 'nvim_lsp'}, {name = 'nvim_lsp'},
{name = 'conjure'},
{name = 'latex_symbols'}, {name = 'latex_symbols'},
{name = 'tmux'}, {name = 'tmux'},
{name = 'orgmode'} {name = 'orgmode'}

View File

@ -65,6 +65,11 @@ function M.blankline_conf()
-- vim.api.nvim_command('autocmd CursorMoved * IndentBlanklineRefresh') -- vim.api.nvim_command('autocmd CursorMoved * IndentBlanklineRefresh')
end end
function M.aniseed_conf()
-- Compile fennel config to lua on startup
require('aniseed.env').init()
end
function M.treesitter_conf() function M.treesitter_conf()
vim.api.nvim_command('set foldmethod=expr') vim.api.nvim_command('set foldmethod=expr')
vim.api.nvim_command('set foldexpr=nvim_treesitter#foldexpr()') vim.api.nvim_command('set foldexpr=nvim_treesitter#foldexpr()')

View File

@ -70,6 +70,10 @@ function M.neogit_conf()
} }
end end
function M.diffview_conf()
require('diffview').setup {diff_binaries = true}
end
function M.asynctasks_conf() function M.asynctasks_conf()
-- vim.g.asyncrun_open = 8 -- when using quickfix window (output=terminal is preferable) -- vim.g.asyncrun_open = 8 -- when using quickfix window (output=terminal is preferable)
vim.g.asyncrun_rootmarks = {'.git', '.svn', '.root', '.hg', '.projectile'} vim.g.asyncrun_rootmarks = {'.git', '.svn', '.root', '.hg', '.projectile'}

View File

@ -72,6 +72,7 @@ function M.load_options()
opt.grepformat = '%f:%l:%c:%m' opt.grepformat = '%f:%l:%c:%m'
opt.grepprg = 'rg --hidden --vimgrep --smart-case --' opt.grepprg = 'rg --hidden --vimgrep --smart-case --'
opt.diffopt = 'filler,iwhite,internal,algorithm:patience' opt.diffopt = 'filler,iwhite,internal,algorithm:patience'
-- opt.spell = true
-- Transparency -- Transparency
opt.pumblend = 5 opt.pumblend = 5

View File

@ -56,6 +56,7 @@ return require('packer').startup(
} }
use { use {
'folke/which-key.nvim', 'folke/which-key.nvim',
event = 'VimEnter',
config = ui.whichkey_conf config = ui.whichkey_conf
} }
use { use {
@ -83,6 +84,11 @@ return require('packer').startup(
event = 'BufRead', event = 'BufRead',
config = editor.blankline_conf config = editor.blankline_conf
} }
use { -- TODO: config (lua -> fennel) + learn clojure, fennel, guile scheme
'Olical/conjure',
ft = {'clojure', 'fennel', 'scheme'},
requires = {{'Olical/aniseed', config = editor.aniseed_conf}}
}
use { use {
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate', run = ':TSUpdate',
@ -138,7 +144,7 @@ return require('packer').startup(
use { -- TODO: move to nvim-parinfer (lua) use { -- TODO: move to nvim-parinfer (lua)
'eraserhd/parinfer-rust', 'eraserhd/parinfer-rust',
run = 'cargo build --release', run = 'cargo build --release',
ft = {'clojure', 'lisp', 'scheme'} ft = {'clojure', 'lisp', 'scheme', 'fennel'}
} }
--------- ---------
@ -193,27 +199,26 @@ return require('packer').startup(
'hrsh7th/nvim-cmp', 'hrsh7th/nvim-cmp',
event = 'InsertEnter', event = 'InsertEnter',
wants = 'LuaSnip', wants = 'LuaSnip',
requires = { requires = {{
{ 'L3MON4D3/LuaSnip',
'L3MON4D3/LuaSnip', wants = 'friendly-snippets',
wants = 'friendly-snippets', requires = {{'rafamadriz/friendly-snippets', opt = true}},
requires = {{'rafamadriz/friendly-snippets', opt = true}}, config = completion.snippets_conf,
config = completion.snippets_conf, opt = true
opt = true }},
},
{'saadparwaiz1/cmp_luasnip', after = 'nvim-cmp', opt = true},
{'hrsh7th/cmp-path', after = 'nvim-cmp', opt = true},
{'hrsh7th/cmp-buffer', after = 'nvim-cmp', opt = true},
-- {'hrsh7th/cmp-calc', after = 'nvim-cmp', opt = true},
-- {'f3fora/cmp-nuspell', after = 'nvim-cmp', rocks={'lua-nuspell'}, opt = true},
{'f3fora/cmp-spell', after = 'nvim-cmp', opt = true},
{'hrsh7th/cmp-emoji', after = 'nvim-cmp', opt = true},
{'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp', opt = true},
{'kdheepak/cmp-latex-symbols', after = 'nvim-cmp', opt = true},
{'andersevenrud/compe-tmux', after = 'nvim-cmp', branch = 'cmp', opt = true}
},
config = completion.cmp_conf config = completion.cmp_conf
} }
use {'saadparwaiz1/cmp_luasnip', after = 'nvim-cmp'}
use {'hrsh7th/cmp-path', after = 'nvim-cmp'}
use {'hrsh7th/cmp-buffer', after = 'nvim-cmp'}
-- use {'hrsh7th/cmp-calc', after = 'nvim-cmp'}
-- use {'f3fora/cmp-nuspell', after = 'nvim-cmp', rocks={'lua-nuspell'}}
use {'f3fora/cmp-spell', after = 'nvim-cmp'}
use {'hrsh7th/cmp-emoji', after = 'nvim-cmp'}
use {'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp'}
use {'kdheepak/cmp-latex-symbols', after = 'nvim-cmp'}
use {'andersevenrud/compe-tmux', after = 'nvim-cmp', branch = 'cmp'}
use {'PaterJason/cmp-conjure', after = {'conjure', 'nvim-cmp'}}
use { use {
'windwp/nvim-autopairs', 'windwp/nvim-autopairs',
after = 'nvim-cmp', after = 'nvim-cmp',
@ -281,17 +286,11 @@ return require('packer').startup(
'TimUntersberger/neogit', 'TimUntersberger/neogit',
cmd = 'Neogit', cmd = 'Neogit',
wants = {'diffview.nvim', 'plenary.nvim'}, wants = {'diffview.nvim', 'plenary.nvim'},
requires = { requires = {{
{ 'sindrets/diffview.nvim',
'sindrets/diffview.nvim', config = tools.diffview_conf,
config = function() opt = true
require('diffview').setup { }},
diff_binaries = true
}
end,
opt = true
}
},
config = tools.neogit_conf config = tools.neogit_conf
} }
use { use {
@ -381,16 +380,12 @@ return require('packer').startup(
run = ':TSInstall http', run = ':TSInstall http',
config = tools.rest_conf config = tools.rest_conf
} }
-- use { -- TODO: mappings
-- 'rktjmp/hotpot.nvim',
-- config = function() require('hotpot') end
-- }
use { use {
'sbdchd/neoformat', 'sbdchd/neoformat',
cmd = 'Neoformat' cmd = 'Neoformat'
} }
use {'tweekmonster/startuptime.vim', cmd = 'StartupTime'} -- Just for benchmarking use {'tweekmonster/startuptime.vim', cmd = 'StartupTime'} -- Just for benchmarking
-- TODO: conjure + cmp-conjure, dial.nvim, rust-tools.nvim, crates.nvim, go.nvim -- TODO: dial.nvim, rust-tools.nvim, crates.nvim, go.nvim, clojure-vim/*, vim-pandoc
end end
) )