Compare commits
3 Commits
25c2793532
...
b55ff7e6ce
| Author | SHA1 | Date | |
|---|---|---|---|
| b55ff7e6ce | |||
| 4172d1dda7 | |||
| d2718785c9 |
@ -119,6 +119,7 @@ in {
|
||||
|
||||
autoCmd = [
|
||||
{
|
||||
desc = "Lint the file if autolint is enabled";
|
||||
event = ["BufWritePost"];
|
||||
callback.__raw = ''
|
||||
function()
|
||||
@ -129,11 +130,12 @@ in {
|
||||
'';
|
||||
}
|
||||
{
|
||||
desc = "Highlight yanked regions";
|
||||
event = ["TextYankPost"];
|
||||
callback.__raw = "function() vim.highlight.on_yank() end";
|
||||
}
|
||||
{
|
||||
# Resize splits when entire window is resized by wm
|
||||
desc = "Resize splits when Neovim is resized by the WM";
|
||||
event = ["VimResized"];
|
||||
callback.__raw = ''
|
||||
function()
|
||||
@ -144,11 +146,13 @@ in {
|
||||
'';
|
||||
}
|
||||
{
|
||||
desc = "Disable conceal in JSON files";
|
||||
event = ["FileType"];
|
||||
pattern = ["json" "jsonc" "json5"]; # Disable conceal for these filetypes
|
||||
callback.__raw = "function() vim.opt_local.conceallevel = 0 end";
|
||||
}
|
||||
{
|
||||
desc = "Attach JDTLS to Java files";
|
||||
event = ["FileType"];
|
||||
pattern = ["Java" "java"];
|
||||
callback.__raw = ''
|
||||
@ -168,6 +172,20 @@ in {
|
||||
end
|
||||
'';
|
||||
}
|
||||
{
|
||||
desc = "Enable line wrapping in telescope preview";
|
||||
event = ["User"];
|
||||
pattern = ["TelescopePreviewerLoaded"];
|
||||
callback.__raw = ''
|
||||
function(args)
|
||||
if args.data.bufname:match("*.csv") then
|
||||
vim.wo.wrap = false
|
||||
else
|
||||
vim.wo.wrap = true
|
||||
end
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
keymaps = import ./mappings.nix {inherit lib mylib;};
|
||||
@ -1414,6 +1432,10 @@ in {
|
||||
'';
|
||||
opts = {
|
||||
defaults = {
|
||||
wrap_results = false; # Do wrapping in the preview instead, see autoCmd
|
||||
preview = {
|
||||
treesitter = true;
|
||||
};
|
||||
mappings = {
|
||||
i = {
|
||||
"<Esc>" = {__raw = ''function(...) return require("telescope.actions").close(...) end'';};
|
||||
@ -1761,7 +1783,9 @@ in {
|
||||
luasnip # Snippets # TODO: How to add snippets, maybe use luasnip from nixvim directly?
|
||||
|
||||
ltex-extra # Additional ltex lsp support, e.g. for add-to-dictionary action
|
||||
markview # Markdown support
|
||||
|
||||
markview # Markdown support # TODO: Disable in help buffers + confiure a bit more
|
||||
|
||||
# narrow-region # Open a buffer restricted to the selection
|
||||
navbuddy # Structural file view
|
||||
neo-tree # File tree sidebar
|
||||
|
||||
@ -257,15 +257,33 @@
|
||||
action = "<cmd>Telescope current_buffer_fuzzy_find<cr>";
|
||||
options.desc = "Grep Buffer";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = ";";
|
||||
action = "%";
|
||||
options.desc = "Matching ()[]<>";
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = ";";
|
||||
action = "<Esc>";
|
||||
options.desc = "Exit Visual Mode";
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = "?";
|
||||
action = "<cmd>Telescope grep_string<cr>";
|
||||
options.desc = "Find Selection";
|
||||
}
|
||||
];
|
||||
|
||||
leader = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>l";
|
||||
action = "<cmd>Telescope oldfiles<cr>";
|
||||
options.desc = "Last Files";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>L";
|
||||
@ -296,6 +314,12 @@
|
||||
action = "<cmd>Telescope resume<cr>";
|
||||
options.desc = "Last Telescope Picker";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>;";
|
||||
action = "<cmd>Telescope command_history<cr>";
|
||||
options.desc = "Last Commands";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>:";
|
||||
@ -425,15 +449,16 @@
|
||||
action = "+buffers";
|
||||
}
|
||||
{
|
||||
# See :h telescope.builtin.buffers() for sorting opts
|
||||
mode = "n";
|
||||
key = "<leader>bb";
|
||||
action = "<cmd>Telescope buffers sort_lastused=true<cr>"; # There is also sort_mru=true
|
||||
action = "<cmd>Telescope buffers ignore_current_buffer=false sort_mru=true<cr>";
|
||||
options.desc = "List Buffers";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader><Space>";
|
||||
action = "<cmd>Telescope buffers sort_lastused=true<cr>";
|
||||
action = "<cmd>Telescope buffers ignore_current_buffer=false sort_mru=true<cr>";
|
||||
options.desc = "List Buffers";
|
||||
}
|
||||
{
|
||||
@ -702,6 +727,7 @@
|
||||
# options.desc = "Rename LSP symbol";
|
||||
# }
|
||||
{
|
||||
# NOTE: There is also Telescope quickfix
|
||||
mode = "n";
|
||||
key = "<leader>ca";
|
||||
action = "<cmd>lua vim.lsp.buf.code_action()<cr>";
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
winblend = 30; # Floating popup transparency
|
||||
sessionoptions = ["buffers" "curdir" "tabpages" "winsize" "help" "globals" "skiprtp" "folds"];
|
||||
showtabline = 0; # Disable tabline
|
||||
conceallevel = 2;
|
||||
|
||||
# Cursor
|
||||
ruler = true; # Show cursor position in status line
|
||||
|
||||
Reference in New Issue
Block a user