Skip to content

Commit

Permalink
Update nvim
Browse files Browse the repository at this point in the history
  • Loading branch information
milon committed Nov 24, 2024
1 parent 61d2115 commit 439284e
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 2 deletions.
11 changes: 9 additions & 2 deletions files/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{
"catppuccin": { "branch": "main", "commit": "637d99e638bc6f1efedac582f6ccab08badac0c6" },
"catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" },
"lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" },
"neoscroll.nvim": { "branch": "master", "commit": "e58ecc61e38f348dcc8f2af037fe7031f8a6ef7c" },
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
"nvim-colorizer.lua": { "branch": "master", "commit": "6059927ee649f02fcc819efc213ea78ee9eb2a7d" },
"nvim-colorizer.lua": { "branch": "master", "commit": "4acf88d31b3a7a1a7f31e9c30bf2b23c6313abdb" },
"nvim-web-devicons": { "branch": "master", "commit": "f09be61d05bebcba85bb47be1931322d51b95644" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "649b662a8f476fd2c0289570764459e95ebaa3f3" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" },
"vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" },
"vim-eunuch": { "branch": "master", "commit": "6c6af39aa0a25223389607338ae965c5dfc7c972" },
"vim-rooter": { "branch": "master", "commit": "51402fb77c4d6ae94994e37dc7ca13bec8f4afcc" },
Expand Down
117 changes: 117 additions & 0 deletions files/nvim/lua/user/plugins/telescope.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
-- Fuzzy finder

return {
'nvim-telescope/telescope.nvim',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons',
'nvim-telescope/telescope-live-grep-args.nvim',
'nvim-telescope/telescope-ui-select.nvim',
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release' },
},
keys = {
{ '<leader>f', function() require('telescope.builtin').find_files() end },
{ '<leader>F', function() require('telescope.builtin').find_files({ no_ignore = true, prompt_title = 'All Files' }) end },
{ '<leader>b', function() require('telescope.builtin').buffers() end },
{ '<leader>g', function() require('telescope').extensions.live_grep_args.live_grep_args({
prompt_title = 'Grep Project',
vimgrep_arguments = {
"rg",
"--hidden",
"-L",
"--color=never",
"--sort=path",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case",
}
}) end },
{ '<leader>G', function() require('telescope').extensions.live_grep_args.live_grep_args({
prompt_title = 'Grep All Files',
vimgrep_arguments = {
"rg",
"--hidden",
"--no-ignore",
"-L",
"--color=never",
"--sort=path",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case",
},
}) end },
{ '<leader>h', function() require('telescope.builtin').help_tags() end },
{ '<leader>s', function() require('telescope.builtin').lsp_document_symbols() end },
},
config = function ()
local actions = require('telescope.actions')

require('telescope').setup({
defaults = {
path_display = { truncate = 1 },
prompt_prefix = '',
selection_caret = ' ',
layout_config = {
prompt_position = 'top',
},
preview = {
filesize_limit = 1,
timeout = 200,
msg_bg_fillchar = ' ',
},
sorting_strategy = 'ascending',
mappings = {
i = {
['<esc>'] = actions.close,
['<C-Down>'] = actions.cycle_history_next,
['<C-Up>'] = actions.cycle_history_prev,
},
},
file_ignore_patterns = { '.git/' },
},
extensions = {
live_grep_args = {
mappings = {
i = {
["<C-k>"] = require("telescope-live-grep-args.actions").quote_prompt(),
["<C-space>"] = actions.to_fuzzy_refine,
},
},
},
['ui-select'] = {
require('telescope.themes').get_dropdown(),
},
},
pickers = {
find_files = {
hidden = true,
},
buffers = {
previewer = false,
layout_config = {
width = 80,
},
},
oldfiles = {
prompt_title = 'History',
},
lsp_references = {
previewer = false,
},
lsp_definitions = {
previewer = false,
},
lsp_document_symbols = {
symbol_width = 55,
},
},
})

require('telescope').load_extension('fzf')
require('telescope').load_extension('ui-select')
end,
}
3 changes: 3 additions & 0 deletions files/zsh_aliases
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ function nah() {
fi
}

# nvim to vim
alias vim="nvim"

# bat (cat on steroids)
alias cat="bat --paging=never --theme=Coldark-Dark --plain"

Expand Down
1 change: 1 addition & 0 deletions support/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ tap 'homebrew/bundle'
# Binaries
brew 'bat' # cat on steroids
brew 'btop' # cli activity monitor
brew 'cmake'
brew 'coreutils' # Those that come with macOS are outdated
brew 'curl'
brew 'd2' # diagram language
Expand Down

0 comments on commit 439284e

Please sign in to comment.