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

View File

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

View File

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

View File

@ -70,6 +70,10 @@ function M.neogit_conf()
}
end
function M.diffview_conf()
require('diffview').setup {diff_binaries = true}
end
function M.asynctasks_conf()
-- vim.g.asyncrun_open = 8 -- when using quickfix window (output=terminal is preferable)
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.grepprg = 'rg --hidden --vimgrep --smart-case --'
opt.diffopt = 'filler,iwhite,internal,algorithm:patience'
-- opt.spell = true
-- Transparency
opt.pumblend = 5

View File

@ -56,6 +56,7 @@ return require('packer').startup(
}
use {
'folke/which-key.nvim',
event = 'VimEnter',
config = ui.whichkey_conf
}
use {
@ -83,6 +84,11 @@ return require('packer').startup(
event = 'BufRead',
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 {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate',
@ -138,7 +144,7 @@ return require('packer').startup(
use { -- TODO: move to nvim-parinfer (lua)
'eraserhd/parinfer-rust',
run = 'cargo build --release',
ft = {'clojure', 'lisp', 'scheme'}
ft = {'clojure', 'lisp', 'scheme', 'fennel'}
}
---------
@ -193,27 +199,26 @@ return require('packer').startup(
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
wants = 'LuaSnip',
requires = {
{
'L3MON4D3/LuaSnip',
wants = 'friendly-snippets',
requires = {{'rafamadriz/friendly-snippets', opt = true}},
config = completion.snippets_conf,
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}
},
requires = {{
'L3MON4D3/LuaSnip',
wants = 'friendly-snippets',
requires = {{'rafamadriz/friendly-snippets', opt = true}},
config = completion.snippets_conf,
opt = true
}},
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 {
'windwp/nvim-autopairs',
after = 'nvim-cmp',
@ -281,17 +286,11 @@ return require('packer').startup(
'TimUntersberger/neogit',
cmd = 'Neogit',
wants = {'diffview.nvim', 'plenary.nvim'},
requires = {
{
'sindrets/diffview.nvim',
config = function()
require('diffview').setup {
diff_binaries = true
}
end,
opt = true
}
},
requires = {{
'sindrets/diffview.nvim',
config = tools.diffview_conf,
opt = true
}},
config = tools.neogit_conf
}
use {
@ -381,16 +380,12 @@ return require('packer').startup(
run = ':TSInstall http',
config = tools.rest_conf
}
-- use { -- TODO: mappings
-- 'rktjmp/hotpot.nvim',
-- config = function() require('hotpot') end
-- }
use {
'sbdchd/neoformat',
cmd = 'Neoformat'
}
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
)