fzf->telescope
This commit is contained in:
parent
cae6b5663d
commit
a26529aa7b
3 changed files with 59 additions and 3 deletions
|
@ -7,6 +7,10 @@ set completeopt=menu,menuone,noselect
|
||||||
local cmp = require'cmp'
|
local cmp = require'cmp'
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
|
window = {
|
||||||
|
completion = cmp.config.window.bordered(winhighlight),
|
||||||
|
documentation = cmp.config.window.bordered(winhighlight),
|
||||||
|
},
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
require'snippy'.expand_snippet(args.body)
|
require'snippy'.expand_snippet(args.body)
|
||||||
|
|
|
@ -47,6 +47,19 @@ local lsp_flags = {
|
||||||
-- always show sign column
|
-- always show sign column
|
||||||
vim.cmd([[set signcolumn=yes]])
|
vim.cmd([[set signcolumn=yes]])
|
||||||
|
|
||||||
|
vim.g.moonflyNormalFloat = true
|
||||||
|
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
|
||||||
|
vim.lsp.handlers.hover, {
|
||||||
|
border = "single"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
|
||||||
|
vim.lsp.handlers.signatureHelp, {
|
||||||
|
border = "single"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
vim.diagnostic.config({ float = { border = "single" } })
|
||||||
|
|
||||||
-- Setting up servers per language
|
-- Setting up servers per language
|
||||||
-- Default nvim-lsp setup: nil, clangd
|
-- Default nvim-lsp setup: nil, clangd
|
||||||
local servers = { 'nil_ls', 'clangd' }
|
local servers = { 'nil_ls', 'clangd' }
|
||||||
|
@ -66,5 +79,12 @@ rt.setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
|
settings = {
|
||||||
|
["rust-analyzer"] = {
|
||||||
|
cargo = {
|
||||||
|
allFeatures = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -64,9 +64,21 @@ return require('packer').startup(function(use)
|
||||||
'bluz71/vim-moonfly-colors',
|
'bluz71/vim-moonfly-colors',
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd([[ set termguicolors
|
vim.cmd([[ set termguicolors
|
||||||
colorscheme moonfly ]])
|
colorscheme moonfly
|
||||||
|
]])
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
use {
|
||||||
|
'johnfrankmorgan/whitespace.nvim',
|
||||||
|
config = function ()
|
||||||
|
require('whitespace-nvim').setup({
|
||||||
|
ignored_filetypes = { 'TelescopePrompt', 'Trouble', 'help' },
|
||||||
|
})
|
||||||
|
|
||||||
|
-- remove trailing whitespace with a keybinding
|
||||||
|
vim.keymap.set('n', '<Leader>t', require('whitespace-nvim').trim)
|
||||||
|
end
|
||||||
|
}
|
||||||
use {
|
use {
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
||||||
|
@ -88,10 +100,30 @@ return require('packer').startup(function(use)
|
||||||
-- Nifty stuff
|
-- Nifty stuff
|
||||||
use 'tpope/vim-surround'
|
use 'tpope/vim-surround'
|
||||||
use 'airblade/vim-rooter'
|
use 'airblade/vim-rooter'
|
||||||
|
-- use {
|
||||||
|
-- 'ibhagwan/fzf-lua',
|
||||||
|
-- config = setup_fzf(),
|
||||||
|
-- }
|
||||||
use {
|
use {
|
||||||
'ibhagwan/fzf-lua',
|
'nvim-telescope/telescope.nvim',
|
||||||
config = setup_fzf(),
|
branch = '0.1.x',
|
||||||
|
requires = { { 'nvim-lua/plenary.nvim' } },
|
||||||
|
config = function()
|
||||||
|
require('telescope').setup{
|
||||||
|
pickers = {
|
||||||
|
find_files = {
|
||||||
|
theme = "dropdown",
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
local builtin = require('telescope.builtin')
|
||||||
|
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||||
|
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
||||||
|
vim.keymap.set('n', '<leader>b', builtin.buffers, {})
|
||||||
|
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
-- completion
|
-- completion
|
||||||
use {
|
use {
|
||||||
|
|
Loading…
Add table
Reference in a new issue