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'
|
||||
|
||||
cmp.setup({
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(winhighlight),
|
||||
documentation = cmp.config.window.bordered(winhighlight),
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require'snippy'.expand_snippet(args.body)
|
||||
|
|
|
@ -47,6 +47,19 @@ local lsp_flags = {
|
|||
-- always show sign column
|
||||
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
|
||||
-- Default nvim-lsp setup: nil, clangd
|
||||
local servers = { 'nil_ls', 'clangd' }
|
||||
|
@ -66,5 +79,12 @@ rt.setup({
|
|||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -64,9 +64,21 @@ return require('packer').startup(function(use)
|
|||
'bluz71/vim-moonfly-colors',
|
||||
config = function()
|
||||
vim.cmd([[ set termguicolors
|
||||
colorscheme moonfly ]])
|
||||
colorscheme moonfly
|
||||
]])
|
||||
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 {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
||||
|
@ -88,11 +100,31 @@ return require('packer').startup(function(use)
|
|||
-- Nifty stuff
|
||||
use 'tpope/vim-surround'
|
||||
use 'airblade/vim-rooter'
|
||||
-- use {
|
||||
-- 'ibhagwan/fzf-lua',
|
||||
-- config = setup_fzf(),
|
||||
-- }
|
||||
use {
|
||||
'ibhagwan/fzf-lua',
|
||||
config = setup_fzf(),
|
||||
'nvim-telescope/telescope.nvim',
|
||||
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
|
||||
use {
|
||||
'hrsh7th/nvim-cmp',
|
||||
|
|
Loading…
Add table
Reference in a new issue