Compare commits
No commits in common. "26f4cc6062475ee54cbd7b2e79755f8129ac90db" and "94cd954df9a677b7cdf9a47a8e2b85efd2a97e14" have entirely different histories.
26f4cc6062
...
94cd954df9
6 changed files with 127 additions and 111 deletions
|
@ -76,6 +76,9 @@ map.n.nore[']q'] = ':cnext<cr>'
|
||||||
-- Location list
|
-- Location list
|
||||||
map.n.nore['[l'] = ':lprevious<cr>'
|
map.n.nore['[l'] = ':lprevious<cr>'
|
||||||
map.n.nore[']l'] = ':lnext<cr>'
|
map.n.nore[']l'] = ':lnext<cr>'
|
||||||
|
-- Hunks (from gitsigns)
|
||||||
|
map.n.nore.expr['[h'] = [[&diff ? ']c' : '<cmd>Gitsigns prev_hunk<CR>']]
|
||||||
|
map.n.nore.expr[']h'] = [[&diff ? '[c' : '<cmd>Gitsigns next_hunk<CR>']]
|
||||||
|
|
||||||
-- set our leader key to space since with hjkl, space is largely useless
|
-- set our leader key to space since with hjkl, space is largely useless
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
|
@ -128,9 +131,11 @@ map.n.nore['<leader>s'] =
|
||||||
map.n.nore['<leader>S'] =
|
map.n.nore['<leader>S'] =
|
||||||
[[:lua require 'telescope.builtin'.oldfiles(require 'telescope.themes'.get_ivy())<cr>]]
|
[[:lua require 'telescope.builtin'.oldfiles(require 'telescope.themes'.get_ivy())<cr>]]
|
||||||
-- fuzzy find files in cwd
|
-- fuzzy find files in cwd
|
||||||
map.n.nore['<leader>f'] = [[:lua require 'telescope.builtin'.find_files()<cr>]]
|
map.n.nore['<leader>f'] =
|
||||||
|
[[:lua require 'telescope.builtin'.find_files({follow=true, hidden=true})<cr>]]
|
||||||
-- general full-text search in cwd with rg
|
-- general full-text search in cwd with rg
|
||||||
map.n.nore['<leader>F'] = [[:lua require 'telescope.builtin'.live_grep()<cr>]]
|
map.n.nore['<leader>F'] =
|
||||||
|
[[:lua require 'telescope'.extensions.fzf_writer.grep()<cr>]]
|
||||||
|
|
||||||
-- git status
|
-- git status
|
||||||
map.n.nore['<leader>gs'] = [[:lua require 'telescope.builtin'.git_status()<cr>]]
|
map.n.nore['<leader>gs'] = [[:lua require 'telescope.builtin'.git_status()<cr>]]
|
||||||
|
@ -182,6 +187,9 @@ map.n.nore.silent['<F10>'] = ':TZMinimalist<cr>'
|
||||||
-- map @@ to automatically insert citation reference at cursor
|
-- map @@ to automatically insert citation reference at cursor
|
||||||
map.i.nore.silent['@@'] = '<c-g>u<c-o>:CiteRef<cr>'
|
map.i.nore.silent['@@'] = '<c-g>u<c-o>:CiteRef<cr>'
|
||||||
-- map <leader>cc to insert a complete citation at cursor
|
-- map <leader>cc to insert a complete citation at cursor
|
||||||
|
map.n.nore.silent['<leader>cc'] = ':CiteRef<cr>'
|
||||||
|
-- map <leader>cm to insert markdown prettified citation
|
||||||
|
map.n.nore.silent['<localleader>cm'] = ':CiteMarkdown<cr>'
|
||||||
|
|
||||||
-- SPELL CHECKING
|
-- SPELL CHECKING
|
||||||
-- Spell check set to <leader>O, 'o' for 'orthography':
|
-- Spell check set to <leader>O, 'o' for 'orthography':
|
||||||
|
|
|
@ -2,14 +2,22 @@ local augroup = require('helpers.augroup')
|
||||||
|
|
||||||
-- for each filetype autoformat on save
|
-- for each filetype autoformat on save
|
||||||
-- TODO can automatically gather from formatter table keys?
|
-- TODO can automatically gather from formatter table keys?
|
||||||
|
local filetypes =
|
||||||
|
'bash,cpp,go,html,javascript,lua,python,rust,sh,typescript,zsh'
|
||||||
|
augroup({
|
||||||
|
{
|
||||||
|
'FileType', filetypes, 'autocmd', 'BufWritePost', '<buffer>',
|
||||||
|
'FormatWrite'
|
||||||
|
}
|
||||||
|
}, 'formatonsave')
|
||||||
|
|
||||||
local prettierfmt = {
|
local prettierfmt = {
|
||||||
function()
|
function()
|
||||||
local set_quotes = "--single-quote"
|
|
||||||
if vim.bo.filetype == "json" then set_quotes = "--double-quote" end
|
|
||||||
return {
|
return {
|
||||||
exe = "prettier",
|
exe = "prettier",
|
||||||
args = {
|
args = {
|
||||||
"--stdin-filepath", vim.api.nvim_buf_get_name(0), set_quotes
|
"--stdin-filepath", vim.api.nvim_buf_get_name(0),
|
||||||
|
'--single-quote'
|
||||||
},
|
},
|
||||||
stdin = true
|
stdin = true
|
||||||
}
|
}
|
||||||
|
@ -19,7 +27,9 @@ local shfmt = {
|
||||||
function() return {exe = "shfmt", args = {"-i 4"}, stdin = true} end
|
function() return {exe = "shfmt", args = {"-i 4"}, stdin = true} end
|
||||||
}
|
}
|
||||||
|
|
||||||
local formatters = {
|
require('formatter').setup({
|
||||||
|
logging = false,
|
||||||
|
filetype = {
|
||||||
bash = shfmt,
|
bash = shfmt,
|
||||||
cpp = {
|
cpp = {
|
||||||
function()
|
function()
|
||||||
|
@ -34,14 +44,20 @@ local formatters = {
|
||||||
go = {function() return {exe = "goimports", stdin = true} end},
|
go = {function() return {exe = "goimports", stdin = true} end},
|
||||||
html = prettierfmt,
|
html = prettierfmt,
|
||||||
javascript = prettierfmt,
|
javascript = prettierfmt,
|
||||||
json = prettierfmt,
|
|
||||||
lua = {
|
lua = {
|
||||||
function()
|
function()
|
||||||
return
|
return {
|
||||||
{exe = "lua-format", args = {"--indent-width", 4}, stdin = true}
|
exe = "lua-format",
|
||||||
|
args = {"--indent-width", 4},
|
||||||
|
stdin = true
|
||||||
|
}
|
||||||
|
end
|
||||||
|
},
|
||||||
|
python = {
|
||||||
|
function()
|
||||||
|
return {exe = "black", args = {"-"}, stdin = true}
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
python = {function() return {exe = "black", args = {"-"}, stdin = true} end},
|
|
||||||
rust = {
|
rust = {
|
||||||
function()
|
function()
|
||||||
return {exe = "rustfmt", args = {"--emit=stdout"}, stdin = true}
|
return {exe = "rustfmt", args = {"--emit=stdout"}, stdin = true}
|
||||||
|
@ -50,13 +66,5 @@ local formatters = {
|
||||||
sh = shfmt,
|
sh = shfmt,
|
||||||
typescript = prettierfmt,
|
typescript = prettierfmt,
|
||||||
zsh = shfmt
|
zsh = shfmt
|
||||||
}
|
}
|
||||||
|
})
|
||||||
require('formatter').setup({logging = false, filetype = formatters})
|
|
||||||
|
|
||||||
-- gather filetypes to autocorrect for each activated formatter above
|
|
||||||
local filetype = ""
|
|
||||||
for k, _ in pairs(formatters) do filetype = filetype .. "," .. k end
|
|
||||||
augroup({
|
|
||||||
{'FileType', filetype, 'autocmd', 'BufWritePost', '<buffer>', 'FormatWrite'}
|
|
||||||
}, 'formatonsave')
|
|
||||||
|
|
|
@ -1,36 +1,32 @@
|
||||||
-- Setup up telescope fuzzy finding settings
|
|
||||||
--
|
|
||||||
-- Makes use of optionally installed external programs to work fully:
|
|
||||||
-- rg (ripgrep) for in-text searches
|
|
||||||
-- fd for quicker directory structure searches
|
|
||||||
-- lsp for a variety of lsp queries
|
|
||||||
require("telescope").setup {
|
require("telescope").setup {
|
||||||
defaults = {
|
defaults = {
|
||||||
|
file_sorter = require("telescope.sorters").get_fzy_sorter,
|
||||||
vimgrep_arguments = {
|
vimgrep_arguments = {
|
||||||
'rg', '--ignore-vcs', '--hidden', '--color=never', '--no-heading',
|
'rg',
|
||||||
'--with-filename', '--line-number', '--column', '--smart-case'
|
'--ignore-vcs',
|
||||||
}
|
'--hidden',
|
||||||
|
'--color=never',
|
||||||
|
'--no-heading',
|
||||||
|
'--with-filename',
|
||||||
|
'--line-number',
|
||||||
|
'--column',
|
||||||
|
'--smart-case'
|
||||||
},
|
},
|
||||||
pickers = {
|
|
||||||
buffers = {theme = "ivy"},
|
|
||||||
oldfiles = {theme = "ivy"},
|
|
||||||
find_files = {
|
|
||||||
theme = "dropdown",
|
|
||||||
-- nice minimal picker design
|
|
||||||
borderchars = {
|
|
||||||
{'─', '│', '─', '│', '┌', '┐', '┘', '└'},
|
|
||||||
prompt = {"─", "│", " ", "│", '┌', '┐', "│", "│"},
|
|
||||||
results = {
|
|
||||||
"─", "│", "─", "│", "├", "┤", "┘", "└"
|
|
||||||
},
|
},
|
||||||
preview = {
|
extensions = {
|
||||||
'─', '│', '─', '│', '┌', '┐', '┘', '└'
|
fzy_native = {
|
||||||
}
|
override_generic_sorter = false,
|
||||||
|
override_file_sorter = true
|
||||||
},
|
},
|
||||||
width = 0.8,
|
fzf_writer = {
|
||||||
previewer = false,
|
minimum_grep_characters = 2,
|
||||||
prompt_title = false
|
minimum_files_characters = 2,
|
||||||
|
|
||||||
|
-- Disabled by default.
|
||||||
|
-- Will probably slow down some aspects of the sorter, but can make color highlights.
|
||||||
|
use_highlighter = true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
require("telescope").load_extension("fzf")
|
require("telescope").load_extension("fzy_native")
|
||||||
|
require("telescope").load_extension("fzf_writer")
|
||||||
|
|
|
@ -159,12 +159,11 @@ require("packer").startup(function()
|
||||||
-- fuzzy matching
|
-- fuzzy matching
|
||||||
use {
|
use {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
requires = {
|
requires = {{"nvim-lua/popup.nvim"}, {"nvim-lua/plenary.nvim"}},
|
||||||
{"nvim-lua/popup.nvim"}, {"nvim-lua/plenary.nvim"},
|
|
||||||
{"nvim-telescope/telescope-fzf-native.nvim", run = 'make'}
|
|
||||||
},
|
|
||||||
config = function() require('plug._telescope') end
|
config = function() require('plug._telescope') end
|
||||||
}
|
}
|
||||||
|
use "nvim-telescope/telescope-fzy-native.nvim"
|
||||||
|
use "nvim-telescope/telescope-fzf-writer.nvim"
|
||||||
|
|
||||||
-- snippeting
|
-- snippeting
|
||||||
use {"hrsh7th/vim-vsnip", event = "InsertEnter"} -- snippet engine
|
use {"hrsh7th/vim-vsnip", event = "InsertEnter"} -- snippet engine
|
||||||
|
|
|
@ -38,7 +38,7 @@ report.next.labels=,Project,Pri,Urg,Due,Description,Tags,Sched,Age,Recur
|
||||||
report.overdue.filter=(status:pending or +WAITING) and +OVERDUE and -TODAY
|
report.overdue.filter=(status:pending or +WAITING) and +OVERDUE and -TODAY
|
||||||
# custom today report, sorted by urgency
|
# custom today report, sorted by urgency
|
||||||
report.today.description=Tasks scheduled for today, sorted by urgency
|
report.today.description=Tasks scheduled for today, sorted by urgency
|
||||||
report.today.filter=status:pending -WAITING +TODAY or +OVERDUE limit:page
|
report.today.filter=status:pending -WAITING +TODAY limit:page
|
||||||
report.today.sort=urgency-
|
report.today.sort=urgency-
|
||||||
report.today.columns=id,project,priority,urgency,due,description,tags,scheduled,entry.age,recur
|
report.today.columns=id,project,priority,urgency,due,description,tags,scheduled,entry.age,recur
|
||||||
report.today.labels=,Project,Pri,Urg,Due,Description,Tags,Sched,Age,Recur
|
report.today.labels=,Project,Pri,Urg,Due,Description,Tags,Sched,Age,Recur
|
||||||
|
@ -58,7 +58,6 @@ urgency.tags.coefficient=0
|
||||||
urgency.annotations.coefficient=0
|
urgency.annotations.coefficient=0
|
||||||
# maybe items are not urgent at all
|
# maybe items are not urgent at all
|
||||||
urgency.user.tag.maybe.coefficient=-100.0
|
urgency.user.tag.maybe.coefficient=-100.0
|
||||||
urgency.user.tag.next.coefficient=5.0
|
|
||||||
|
|
||||||
# Holidays for calendar
|
# Holidays for calendar
|
||||||
include /usr/share/doc/task/rc/holidays.de-DE.rc
|
include /usr/share/doc/task/rc/holidays.de-DE.rc
|
||||||
|
|
|
@ -80,6 +80,12 @@ riverctl map normal $mod N spawn "dunstctl close"
|
||||||
riverctl map normal $mod+Shift N spawn "dunstctl close-all"
|
riverctl map normal $mod+Shift N spawn "dunstctl close-all"
|
||||||
riverctl map normal $mod+Control N spawn "dunstctl history-pop"
|
riverctl map normal $mod+Control N spawn "dunstctl history-pop"
|
||||||
|
|
||||||
|
# # Clear clipboard
|
||||||
|
# riverctl map normal $mod BackSpace spawn 'wl-copy -c && printf ''|xclip -selection c'
|
||||||
|
|
||||||
|
# # PixelColor script
|
||||||
|
# riverctl map normal "Mod1" C spawn 'bash ~/.config/bin/pixelcolor'
|
||||||
|
|
||||||
# MOVEMENT
|
# MOVEMENT
|
||||||
# focus the next/previous view in the layout stack
|
# focus the next/previous view in the layout stack
|
||||||
riverctl map normal $mod J focus-view next
|
riverctl map normal $mod J focus-view next
|
||||||
|
|
Loading…
Reference in a new issue