Compare commits
4 Commits
4499dee3d6
...
helpgrep
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d21cd45701 | ||
|
|
9d5868304f | ||
| 56beb52997 | |||
| 48ad466bd3 |
@@ -1 +0,0 @@
|
|||||||
autocmd BufNewFile,BufReadPost CMakeCache.txt set filetype=cmakecache
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
" Force *.def to C++ filetype for LLVM
|
|
||||||
au BufNewFile,BufReadPost *.def set filetype=cpp
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
" Set .ll files to LLVM IR filetype
|
|
||||||
au BufNewFile,BufReadPost *.ll set filetype=llvm
|
|
||||||
au BufNewFile,BufReadPost *.test set filetype=llvm
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
" Force *.md to markdown filetype
|
|
||||||
au BufNewFile,BufReadPost *.md set filetype=markdown
|
|
||||||
au BufNewFile,BufReadPost *.ronn set filetype=markdown
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
" Force *.cl to OpenCL C filetype
|
|
||||||
au BufNewFile,BufReadPost *.cl set filetype=opencl
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
" Force lit.cfg/lit.local.cfg to be Python
|
|
||||||
au BufNewFile,BufReadPost lit.cfg set filetype=python
|
|
||||||
au BufNewFile,BufReadPost lit.local.cfg set filetype=python
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
autocmd BufNewFile,BufReadPost */requirements.txt set filetype=requirements
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
" Force *.td to tablegen filetype
|
|
||||||
au BufNewFile,BufReadPost *.td set filetype=tablegen
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
" Force .enter/.exit to be zsh
|
|
||||||
au BufNewFile,BufReadPost .enter set filetype=zsh
|
|
||||||
au BufNewFile,BufReadPost .exit set filetype=zsh
|
|
||||||
@@ -93,11 +93,7 @@ return {
|
|||||||
['clangd'] = function()
|
['clangd'] = function()
|
||||||
require('lspconfig').clangd.setup({
|
require('lspconfig').clangd.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
cmd = {
|
cmd = { 'clangd', '--completion-style=detailed' }
|
||||||
'clangd',
|
|
||||||
'--completion-style=detailed',
|
|
||||||
'--function-arg-placeholders=1',
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ return {
|
|||||||
'nvim-telescope/telescope-fzy-native.nvim',
|
'nvim-telescope/telescope-fzy-native.nvim',
|
||||||
'nvim-tree/nvim-web-devicons',
|
'nvim-tree/nvim-web-devicons',
|
||||||
'axkirillov/easypick.nvim',
|
'axkirillov/easypick.nvim',
|
||||||
|
'catgoose/telescope-helpgrep.nvim',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local telescope = require('telescope')
|
local telescope = require('telescope')
|
||||||
|
local actions = require('telescope.actions')
|
||||||
telescope.setup({
|
telescope.setup({
|
||||||
defaults = {
|
defaults = {
|
||||||
mappings = {
|
mappings = {
|
||||||
@@ -20,11 +22,25 @@ return {
|
|||||||
['<C-s>'] = 'select_horizontal',
|
['<C-s>'] = 'select_horizontal',
|
||||||
['<C-h>'] = 'preview_scrolling_left',
|
['<C-h>'] = 'preview_scrolling_left',
|
||||||
['<C-l>'] = 'preview_scrolling_right',
|
['<C-l>'] = 'preview_scrolling_right',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
layout_config = {
|
layout_config = {
|
||||||
height = 0.7,
|
height = 0.7,
|
||||||
}
|
},
|
||||||
|
},
|
||||||
|
extensions = {
|
||||||
|
helpgrep = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<CR>"] = actions.select_default,
|
||||||
|
["<C-v>"] = actions.select_vertical,
|
||||||
|
},
|
||||||
|
n = {
|
||||||
|
["<CR>"] = actions.select_default,
|
||||||
|
["<C-s>"] = actions.select_horizontal,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
telescope.load_extension('fzy_native')
|
telescope.load_extension('fzy_native')
|
||||||
@@ -36,7 +52,8 @@ return {
|
|||||||
vim.keymap.set('n', '<leader>gg', builtin.live_grep, opts)
|
vim.keymap.set('n', '<leader>gg', builtin.live_grep, opts)
|
||||||
vim.keymap.set('n', '<leader>rg', builtin.grep_string, opts)
|
vim.keymap.set('n', '<leader>rg', builtin.grep_string, opts)
|
||||||
vim.keymap.set('n', '<leader>gb', builtin.buffers, opts)
|
vim.keymap.set('n', '<leader>gb', builtin.buffers, opts)
|
||||||
vim.keymap.set('n', '<leader>gh', builtin.help_tags, opts)
|
vim.keymap.set('n', '<leader>ht', builtin.help_tags, opts)
|
||||||
|
vim.keymap.set('n', '<leader>gh', require('telescope-helpgrep').live_grep, opts)
|
||||||
vim.keymap.set('n', '<leader>bl', builtin.current_buffer_fuzzy_find, opts)
|
vim.keymap.set('n', '<leader>bl', builtin.current_buffer_fuzzy_find, opts)
|
||||||
|
|
||||||
require('easypick').setup({
|
require('easypick').setup({
|
||||||
|
|||||||
19
plugin/filetype.lua
Normal file
19
plugin/filetype.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
vim.filetype.add({
|
||||||
|
extension = {
|
||||||
|
cl = 'opencl',
|
||||||
|
def = 'cpp',
|
||||||
|
ll = 'llvm',
|
||||||
|
md = 'markdown',
|
||||||
|
ronn = 'markdown',
|
||||||
|
td = 'tablegen',
|
||||||
|
test = 'llvm',
|
||||||
|
},
|
||||||
|
filename = {
|
||||||
|
['.enter'] = 'zsh',
|
||||||
|
['.exit'] = 'zsh',
|
||||||
|
['CMakeCache.txt'] = 'cmakecache',
|
||||||
|
['lit.cfg'] = 'python',
|
||||||
|
['lit.local.cfg'] = 'python',
|
||||||
|
['requirements.txt'] = 'requirements',
|
||||||
|
},
|
||||||
|
})
|
||||||
6
snippets/rst.snippets
Normal file
6
snippets/rst.snippets
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# reStructuredText snippets
|
||||||
|
|
||||||
|
snippet code
|
||||||
|
.. code-block:: ${1:language}
|
||||||
|
|
||||||
|
$0
|
||||||
Reference in New Issue
Block a user