Lualine and Telescope Fzf
This commit is contained in:
@@ -1,22 +1,27 @@
|
||||
{
|
||||
"auto-dark-mode.nvim": { "branch": "master", "commit": "e328dc463d238cb7d690fb4daf068eba732a5a14" },
|
||||
"cloak.nvim": { "branch": "main", "commit": "9abe4e986e924fc54a972c1b0ff52b65a0622624" },
|
||||
"cloak.nvim": { "branch": "main", "commit": "462e84e1659d984196d09f7d16690b19b9aee804" },
|
||||
"copilot.vim": { "branch": "release", "commit": "3b39e786d865df9ba77fe61624d6ee646528a809" },
|
||||
"flexoki": { "branch": "main", "commit": "975654bce67514114db89373539621cff42befb5" },
|
||||
"flexoki-neovim": { "branch": "main", "commit": "975654bce67514114db89373539621cff42befb5" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" },
|
||||
"git-blame.nvim": { "branch": "master", "commit": "a0282d05adbee80aaf4e2ff35b81b52940b67bed" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "26dac2fcadb6e622790ab08e36d0dba3d3765398" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "55716a879568a498fa236593c8119789054a3b8e" },
|
||||
"mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" },
|
||||
"nvim-dap": { "branch": "master", "commit": "fc880e82059eb21c0fa896be60146e5f17680648" },
|
||||
"nvim-dap-ruby": { "branch": "main", "commit": "a2248b7b31f6f096b9e847e769afd00060e0aae4" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "9720eb5fa2f41988e8770f973cd11b76dd568a5d" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "1917b562a02f20885900b1da0f0ea25028ccedab" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "4bdd3800b4148f670c6cf55ef65f490148eeb550" },
|
||||
"nvim-surround": { "branch": "main", "commit": "84a26afce16cffa7e3322cfa80a42cddf60616eb" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "488bec03254207b1dd071be8cb1fb78434b6e777" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "35c1a32b267c969a024ef651c8a25d7ff9018d22" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "75df79feb02d5e0ec114e447453775d4d291ea03" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" },
|
||||
"rspec.nvim": { "branch": "main", "commit": "304682100b152071c2186994690c9646a5d46e05" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "7472420f8734c710bd7009081cef9b97f08a3821" },
|
||||
"undotree": { "branch": "master", "commit": "aa93a7e5890dbbebbc064cd22260721a6db1a196" }
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b323abeb4baf9e4851c3af1961e770ce76c657c7" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
|
||||
"undotree": { "branch": "master", "commit": "aa93a7e5890dbbebbc064cd22260721a6db1a196" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
||||
}
|
||||
@@ -60,8 +60,7 @@ return {
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||
|
||||
local opts = { buffer = bufnr, remap = false }
|
||||
vim.keymap.set('n', 'gd', function() vim.lsp.buf.definition() end, opts)
|
||||
local opts = { remap = false }
|
||||
vim.keymap.set('n', 'K', function() vim.lsp.buf.hover() end, opts)
|
||||
vim.keymap.set('n', '<leader>vws', function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||
vim.keymap.set('n', '<leader>vd', function() vim.diagnostic.open_float() end, opts)
|
||||
|
||||
87
nvim/.config/nvim/lua/yock/plugins/lualine.lua
Normal file
87
nvim/.config/nvim/lua/yock/plugins/lualine.lua
Normal file
@@ -0,0 +1,87 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = {
|
||||
'kyazdani42/nvim-web-devicons',
|
||||
},
|
||||
config = function()
|
||||
local colors = {
|
||||
black = '#100F0F',
|
||||
white = '#FFFCF0',
|
||||
red = '#AF3029',
|
||||
green = '#66800B',
|
||||
blue = '#205EA6',
|
||||
yellow = '#AD8301',
|
||||
gray = '#B7B5AC',
|
||||
darkgray = '#6F6E69',
|
||||
lightgray = '#DAD8CE',
|
||||
inactivegray = '#F2F0E5',
|
||||
}
|
||||
|
||||
local flexoki_dark = {
|
||||
normal = {
|
||||
a = { bg = colors.gray, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.white },
|
||||
c = { bg = colors.darkgray, fg = colors.gray },
|
||||
},
|
||||
insert = {
|
||||
a = { bg = colors.blue, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.black},
|
||||
c = { bg = colors.lightgray, fg = colors.white },
|
||||
},
|
||||
visual = {
|
||||
a = { bg = colors.yellow, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.white },
|
||||
c = { bg = colors.inactivegray, fg = colors.black },
|
||||
},
|
||||
replace = {
|
||||
a = { bg = colors.red, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.white },
|
||||
c = { bg = colors.black, fg = colors.white },
|
||||
},
|
||||
command = {
|
||||
a = { bg = colors.green, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.black },
|
||||
c = { bg = colors.inactivegray, fg = colors.black },
|
||||
},
|
||||
inactive = {
|
||||
a = { bg = colors.darkgray, fg = colors.gray, gui = 'bold' },
|
||||
b = { bg = colors.darkgray, fg = colors.gray },
|
||||
c = { bg = colors.darkgray, fg = colors.gray },
|
||||
},
|
||||
}
|
||||
local flexoki_light = {normal = {
|
||||
a = { bg = colors.gray, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.black },
|
||||
c = { bg = colors.white, fg = colors.black },
|
||||
},
|
||||
insert = {
|
||||
a = { bg = colors.blue, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.black },
|
||||
c = { bg = colors.lightgray, fg = colors.black },
|
||||
},
|
||||
visual = {
|
||||
a = { bg = colors.yellow, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.black },
|
||||
c = { bg = colors.inactivegray, fg = colors.black },
|
||||
},
|
||||
replace = {
|
||||
a = { bg = colors.red, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.black },
|
||||
c = { bg = colors.inactivegray, fg = colors.black },
|
||||
},
|
||||
command = {
|
||||
a = { bg = colors.green, fg = colors.black, gui = 'bold' },
|
||||
b = { bg = colors.lightgray, fg = colors.black },
|
||||
c = { bg = colors.inactivegray, fg = colors.black },
|
||||
},
|
||||
inactive = {
|
||||
a = { bg = colors.darkgray, fg = colors.gray, gui = 'bold' },
|
||||
b = { bg = colors.darkgray, fg = colors.gray },
|
||||
c = { bg = colors.darkgray, fg = colors.gray },
|
||||
},
|
||||
}
|
||||
require('lualine').setup({
|
||||
options = { theme = flexoki_light },
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
|
||||
}
|
||||
@@ -1,37 +1,54 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
opts = {
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"--follow", -- Follow symbolic links
|
||||
"--hidden", -- Search for hidden files
|
||||
"--no-heading", -- Don't group matches by each file
|
||||
"--with-filename", -- Print the file path with the matched lines
|
||||
"--line-number", -- Show line numbers
|
||||
"--column", -- Show column numbers
|
||||
"--smart-case", -- Smart case search
|
||||
config = function()
|
||||
local telescope = require('telescope')
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
-- Exclude some patterns from search
|
||||
"--glob=!**/.git/*",
|
||||
"--glob=!**/.idea/*",
|
||||
"--glob=!**/.vscode/*",
|
||||
"--glob=!**/build/*",
|
||||
"--glob=!**/dist/*",
|
||||
"--glob=!**/yarn.lock",
|
||||
"--glob=!**/package-lock.json",
|
||||
vim.keymap.set('n', '<C-p>', builtin.find_files, { desc = 'Search all files' })
|
||||
vim.keymap.set('n', '<leader>pw', builtin.grep_string, { desc = 'Search the current word' })
|
||||
vim.keymap.set('n', '<leader>ps', builtin.live_grep, { desc = 'Search with grep' })
|
||||
vim.keymap.set('n', '<leader>pf', builtin.help_tags, { desc = 'Search help' })
|
||||
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = 'Search buffers' })
|
||||
vim.keymap.set('n', '<leader>pr', builtin.resume, { desc = 'Resume search' })
|
||||
vim.keymap.set('n', '<leader>pd', builtin.diagnostics, { desc = 'Search diagnostics' })
|
||||
vim.keymap.set('n', '<leader>pb', builtin.builtin, { desc = 'Search Telescope builtins' })
|
||||
|
||||
vim.keymap.set('n', 'gd', builtin.lsp_definitions, { desc = 'Go to definition' })
|
||||
vim.keymap.set('n', 'gD', builtin.lsp_implementations, { desc = 'Go to implementation' })
|
||||
vim.keymap.set('n', 'gr', builtin.lsp_references, { desc = 'Go to references' })
|
||||
vim.keymap.set('n', 'gt', builtin.lsp_type_definitions, { desc = 'Go to type definition' })
|
||||
vim.keymap.set('n', '<leader>ds', builtin.lsp_document_symbols, { desc = 'Search document symbols' })
|
||||
|
||||
vim.keymap.set('n', '<leader>pnc', function()
|
||||
builtin.find_files({
|
||||
prompt_title = 'Neovim Configuration',
|
||||
cwd = vim.fn.stdpath('config'),
|
||||
})
|
||||
end, { desc = 'Search Neovim configuration' })
|
||||
|
||||
telescope.setup({
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true, -- false will only do exact matching
|
||||
override_generic_sorter = false, -- override the generic sorter
|
||||
override_file_sorter = true, -- override the file sorter
|
||||
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
hidden = true,
|
||||
-- needed to exclude some files & dirs from general search
|
||||
-- when not included or specified in .gitignore
|
||||
find_command = {
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"--files",
|
||||
"--hidden",
|
||||
"--follow", -- Follow symbolic links
|
||||
"--hidden", -- Search for hidden files
|
||||
"--no-heading", -- Don't group matches by each file
|
||||
"--with-filename", -- Print the file path with the matched lines
|
||||
"--line-number", -- Show line numbers
|
||||
"--column", -- Show column numbers
|
||||
"--smart-case", -- Smart case search
|
||||
"--trim", -- Trim whitespace from the start and end of each line
|
||||
|
||||
-- Exclude some patterns from search
|
||||
"--glob=!**/.git/*",
|
||||
"--glob=!**/.idea/*",
|
||||
"--glob=!**/.vscode/*",
|
||||
@@ -41,6 +58,12 @@ return {
|
||||
"--glob=!**/package-lock.json",
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" },
|
||||
},
|
||||
}
|
||||
})
|
||||
require('telescope').load_extension('fzf')
|
||||
end,
|
||||
}
|
||||
|
||||
9
nvim/.config/nvim/lua/yock/plugins/which-key.lua
Normal file
9
nvim/.config/nvim/lua/yock/plugins/which-key.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
'folke/which-key.nvim',
|
||||
event = 'VeryLazy',
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end,
|
||||
opts = {},
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
||||
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex, { desc = 'Ex mode' })
|
||||
|
||||
-- Move highlights
|
||||
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")
|
||||
|
||||
-- Paste over without copying what is under
|
||||
@@ -18,13 +18,13 @@ vim.keymap.set('n', '<C-j>', '<C-w>j')
|
||||
vim.keymap.set('n', '<C-k>', '<C-w>k')
|
||||
vim.keymap.set('n', '<C-l>', '<C-w>l')
|
||||
|
||||
-- Diagnostics
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic' })
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic' })
|
||||
vim.keymap.set('n', '<leader>dl', vim.diagnostic.setloclist, { desc = 'Show diagnostic error messages' })
|
||||
vim.keymap.set('n', '<leader>do', vim.diagnostic.open_float, { desc = 'Open diagnostic quickfix' })
|
||||
|
||||
vim.keymap.set('n', '<leader>pf', function() require('telescope.builtin').find_files() end)
|
||||
vim.keymap.set('n', '<C-p>', require('telescope.builtin').git_files, {})
|
||||
vim.keymap.set('n', '<leader>ps', function()
|
||||
require('telescope.builtin').grep_string({ search = vim.fn.input("Grep > ") });
|
||||
end)
|
||||
|
||||
-- Undotree
|
||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||
|
||||
-- DAP
|
||||
@@ -36,3 +36,5 @@ vim.keymap.set('n', '<leader>duo', function() require('dapui').open() end)
|
||||
vim.keymap.set('n', '<leader>duc', function() require('dapui').close() end)
|
||||
vim.keymap.set('n', '<leader>dut', function() require('dapui').toggle() end)
|
||||
|
||||
-- Cloak
|
||||
vim.keymap.set('n', '<leader>ct', function() require('cloak').toggle() end, { desc = 'Toggle cloak' })
|
||||
|
||||
Reference in New Issue
Block a user