Compare commits

...

5 Commits

10 changed files with 37 additions and 29 deletions

View File

@ -0,0 +1,16 @@
local fzf = require("fzf-lua")
fzf.setup({ "max-perf" })
vim.keymap.set("n", "<leader>f<leader>", fzf.builtin) -- Help
vim.keymap.set("n", "<leader>fc", fzf.commands)
vim.keymap.set("n", "<leader>ff", fzf.files)
vim.keymap.set("n", "<leader>fg", fzf.live_grep_native)
vim.keymap.set("n", "<leader>fb", fzf.buffers)
vim.keymap.set("n", "<leader>fd", fzf.diagnostics_workspace)
vim.keymap.set("n", "<leader>fhe", fzf.help_tags)
vim.keymap.set("n", "<leader>fhi", fzf.search_history)
vim.keymap.set("n", "<leader>fma", fzf.marks)
vim.keymap.set("n", "<leader>fma", fzf.man_pages)
vim.keymap.set("i", "<c-f>", fzf.complete_path)

View File

@ -1,4 +1,6 @@
require("image").setup({ require("image").setup({
backend = "kitty",
kitty_method = "normal",
processor = "magick_cli", processor = "magick_cli",
integrations = { integrations = {
markdown = { markdown = {

View File

@ -0,0 +1,15 @@
-- NOTE: May want to move this, as it is more specific to wiki than to pandoc
vim.api.nvim_create_user_command("AnkiDeck", function()
local handle = io.popen("get-anki-decks")
local decks = {}
for line in handle:lines() do
table.insert(decks, line)
end
handle:close()
vim.ui.select(decks, { prompt = "Select Anki deck" }, function(choice)
if choice then
vim.api.nvim_put({ choice }, "", true, true)
end
end)
end, {})

View File

@ -2,4 +2,7 @@ vim.filetype.add({
filename = { filename = {
[".lintstagedrc"] = "json", [".lintstagedrc"] = "json",
}, },
pattern = {
[".*/%.ssh/config%.d/.*"] = "sshconfig",
},
}) })

View File

@ -49,10 +49,8 @@ bootstrap_paq({
{ "hrsh7th/cmp-nvim-lsp" }, { "hrsh7th/cmp-nvim-lsp" },
{ "hrsh7th/cmp-buffer" }, { "hrsh7th/cmp-buffer" },
{ "hrsh7th/cmp-path" }, { "hrsh7th/cmp-path" },
{ "stevearc/dressing.nvim" },
{ "nvim-lua/plenary.nvim" }, { "nvim-lua/plenary.nvim" },
{ "MunifTanjim/nui.nvim" }, { "MunifTanjim/nui.nvim" },
{ "nvim-telescope/telescope.nvim" },
{ "folke/trouble.nvim" }, { "folke/trouble.nvim" },
{ "rktjmp/shipwright.nvim" }, -- For building themes based on lush (e.g. terminal) { "rktjmp/shipwright.nvim" }, -- For building themes based on lush (e.g. terminal)
{ "rktjmp/lush.nvim" }, { "rktjmp/lush.nvim" },

1
.ssh/config Normal file
View File

@ -0,0 +1 @@
Include config.d/*

0
.ssh/config.d/.gitkeep Normal file
View File

View File

@ -1,18 +0,0 @@
" FZF
nn <c-p> :FZF<cr>
nn <leader>p :FZF<cr>
nn <leader>b :Buffers<cr>
nn <leader>h :History<cr>
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-s': 'split',
\ 'ctrl-v': 'vsplit'
\}
" Insert path completion
" ino <expr><c-f> fzf#vim#complete#path('ag -l -g *.md')
" ino <c-f> <plug>(fzf-complete-file-ag)
ino <expr><c-f> fzf#vim#complete#path("ag -l -g '' \| sed -e 's/\.md$//'")
" Use `the_silver_searcher` to find results (for selection if selection)
nn <leader>f :Ag<cr>
vm <leader>f :Ag <C-r>"<cr>

View File

@ -17,9 +17,3 @@ func! GetContext()
endif endif
endfunc endfunc
com! -nargs=0 GetContext :call GetContext() com! -nargs=0 GetContext :call GetContext()
function! Put(str)
put = a:str
endfunction
com! -nargs=0 AnkiDeck call fzf#run(fzf#wrap({'source': 'get-anki-decks', 'sink': function('Put')}))

View File

@ -11,9 +11,6 @@ Plug 'editorconfig/editorconfig-vim'
Plug 'honza/vim-snippets' Plug 'honza/vim-snippets'
Plug 'chrisbra/unicode.vim' Plug 'chrisbra/unicode.vim'
Plug 'ap/vim-css-color' Plug 'ap/vim-css-color'
" Fzf
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
" JS and TypeScript " JS and TypeScript
Plug 'pangloss/vim-javascript', { 'for': ['javascript', 'javascript.jsx'] } Plug 'pangloss/vim-javascript', { 'for': ['javascript', 'javascript.jsx'] }
Plug 'leafgarland/typescript-vim', { 'for': ['typescript', 'typescript.tsx'] } Plug 'leafgarland/typescript-vim', { 'for': ['typescript', 'typescript.tsx'] }