alpha
Login
or
Join now
j3s.sh
/
dotfiles
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
my dotz
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
delete fd, moar nvim pluginsz
author
Jes Olson
date
3 years ago
(Feb 19, 2023, 5:09 PM -0800)
commit
8ead1950
8ead1950090b5ffec5f5032205820fcf03a4066a
parent
7d0b920b
7d0b920bc9c866f696072137981afae2f2988e67
+15
-18
2 changed files
Expand all
Collapse all
Unified
Split
.config
nvim
init.lua
bin
fd
+15
-15
.config/nvim/init.lua
Reviewed
···
7
7
-- Very powerful search
8
8
use {
9
9
'nvim-telescope/telescope.nvim', tag = '0.1.1',
10
10
-
requires = { {'nvim-lua/plenary.nvim', 'BurntSushi/ripgrep'} }
10
10
+
requires = {{
11
11
+
'nvim-lua/plenary.nvim',
12
12
+
'BurntSushi/ripgrep',
13
13
+
'nvim-treesitter/nvim-treesitter'
14
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
18
-
-- Mappings.
19
19
-
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
22
22
+
---- mappings
23
23
+
local builtin = require('telescope.builtin')
20
24
local opts = { noremap=true, silent=true }
25
25
+
-- telescope
26
26
+
vim.keymap.set('n', '<space>ff', builtin.find_files, {})
27
27
+
vim.keymap.set('n', '<space>fg', builtin.live_grep, {})
28
28
+
vim.keymap.set('n', '<space>fb', builtin.buffers, {})
29
29
+
vim.keymap.set('n', '<space>fh', builtin.help_tags, {})
30
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
26
-
27
27
-
-- auto-format on save
28
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
52
-
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
53
53
-
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts)
59
59
+
vim.keymap.set('n', 'gr', builtin.lsp_references, bufopts)
60
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
60
-
-- organize golang imports on save
61
61
-
vim.api.nvim_create_autocmd('BufWritePre', {
62
62
-
pattern = '*.go',
63
63
-
callback = function()
64
64
-
vim.lsp.buf.code_action({ context = { only = { 'source.organizeImports' } }, apply = true })
65
65
-
end
66
66
-
})
-3
bin/fd
Reviewed
···
1
1
-
#!/bin/sh
2
2
-
3
3
-
find . -iname "*$1*"