my dotz
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

delete fd, moar nvim pluginsz

+15 -18
+15 -15
.config/nvim/init.lua
··· 7 7 -- Very powerful search 8 8 use { 9 9 'nvim-telescope/telescope.nvim', tag = '0.1.1', 10 - requires = { {'nvim-lua/plenary.nvim', 'BurntSushi/ripgrep'} } 10 + requires = {{ 11 + 'nvim-lua/plenary.nvim', 12 + 'BurntSushi/ripgrep', 13 + 'nvim-treesitter/nvim-treesitter' 14 + }} 11 15 } 12 16 end) 13 17 ··· 15 19 vim.cmd('set termguicolors') -- needed for truecolor support 16 20 vim.cmd('set mmp=2000') -- resolves https://github.com/vim/vim/issues/2049 17 21 18 - -- Mappings. 19 - -- See `:help vim.diagnostic.*` for documentation on any of the below functions 22 + ---- mappings 23 + local builtin = require('telescope.builtin') 20 24 local opts = { noremap=true, silent=true } 25 + -- telescope 26 + vim.keymap.set('n', '<space>ff', builtin.find_files, {}) 27 + vim.keymap.set('n', '<space>fg', builtin.live_grep, {}) 28 + vim.keymap.set('n', '<space>fb', builtin.buffers, {}) 29 + vim.keymap.set('n', '<space>fh', builtin.help_tags, {}) 30 + -- LSP 21 31 vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts) 22 32 vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) 23 33 vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) 24 34 vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts) 25 35 vim.keymap.set('n', '<space>m', "Go<esc>:put =strftime('%Y-%m-%d')<cr>o============<cr>", opts) 26 - 27 - -- auto-format on save 28 - vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.formatting_sync()]] 29 36 30 37 -- Use an on_attach function to only map the following keys 31 38 -- after the language server attaches to the current buffer ··· 49 56 vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts) 50 57 vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts) 51 58 vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts) 52 - vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) 53 - vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts) 59 + vim.keymap.set('n', 'gr', builtin.lsp_references, bufopts) 60 + vim.keymap.set('n', '<space>F', function() vim.lsp.buf.format { async = true } end, bufopts) 54 61 end 55 62 56 63 ---- golang 57 64 require('lspconfig')['gopls'].setup{ 58 65 on_attach = on_attach, 59 66 } 60 - -- organize golang imports on save 61 - vim.api.nvim_create_autocmd('BufWritePre', { 62 - pattern = '*.go', 63 - callback = function() 64 - vim.lsp.buf.code_action({ context = { only = { 'source.organizeImports' } }, apply = true }) 65 - end 66 - })
-3
bin/fd
··· 1 - #!/bin/sh 2 - 3 - find . -iname "*$1*"