Cleanup
This commit is contained in:
parent
5cd419ef6d
commit
01ba0543b9
@ -39,13 +39,13 @@ vim.keymap.set('n', 'j', 'gj')
|
||||
vim.keymap.set('n', 'k', 'gk')
|
||||
|
||||
-- clipboard keymaps
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>P', '"+P')
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>Y', '"+y$')
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>d', '"+d')
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>d', '"+dd')
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>p', '"+p')
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>y', '"+y')
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>yy', '"+yy')
|
||||
vim.keymap.set({'n', 'v'}, '<leader>P', '"+P')
|
||||
vim.keymap.set({'n', 'v'}, '<leader>Y', '"+y$')
|
||||
vim.keymap.set({'n', 'v'}, '<leader>d', '"+d')
|
||||
vim.keymap.set({'n', 'v'}, '<leader>d', '"+dd')
|
||||
vim.keymap.set({'n', 'v'}, '<leader>p', '"+p')
|
||||
vim.keymap.set({'n', 'v'}, '<leader>y', '"+y')
|
||||
vim.keymap.set({'n', 'v'}, '<leader>yy', '"+yy')
|
||||
|
||||
-- split keymaps
|
||||
vim.keymap.set('n', '<a-=>', '<c-w><c-=>')
|
||||
|
@ -9,5 +9,5 @@ elseif vim.fn.has('win32') == 1 then
|
||||
end
|
||||
|
||||
if font then
|
||||
vim.cmd.Guifont({ args = { font }})
|
||||
vim.cmd.Guifont({args = {font}})
|
||||
end
|
||||
|
26
lua/lsp.lua
26
lua/lsp.lua
@ -5,21 +5,21 @@ if nvim_lspconfig then
|
||||
|
||||
local cmp_nvim_lsp = require('cmp_nvim_lsp')
|
||||
if cmp_nvim_lsp then
|
||||
capabilities = cmp_nvim_lsp.update_capabilities(capabilities, { snippetSupport = false })
|
||||
capabilities = cmp_nvim_lsp.update_capabilities(capabilities, {snippetSupport = false})
|
||||
end
|
||||
|
||||
nvim_lspconfig.clangd.setup({ capabilities = capabilities })
|
||||
nvim_lspconfig.gopls.setup({ capabilities = capabilities })
|
||||
nvim_lspconfig.jedi_language_server.setup({ capabilities = capabilities })
|
||||
nvim_lspconfig.rust_analyzer.setup({ capabilities = capabilities })
|
||||
nvim_lspconfig.tsserver.setup({ capabilities = capabilities })
|
||||
nvim_lspconfig.clangd.setup({capabilities = capabilities})
|
||||
nvim_lspconfig.gopls.setup({capabilities = capabilities})
|
||||
nvim_lspconfig.jedi_language_server.setup({capabilities = capabilities})
|
||||
nvim_lspconfig.rust_analyzer.setup({capabilities = capabilities})
|
||||
nvim_lspconfig.tsserver.setup({capabilities = capabilities})
|
||||
nvim_lspconfig.sumneko_lua.setup({
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = { globals = { 'vim' } },
|
||||
runtime = { version = 'LuaJIT' },
|
||||
telemetry = { enable = false },
|
||||
workspace = { library = vim.api.nvim_get_runtime_file('', true) },
|
||||
diagnostics = {globals = { 'vim' }},
|
||||
runtime = {version = 'LuaJIT'},
|
||||
telemetry = {enable = false},
|
||||
workspace = {library = vim.api.nvim_get_runtime_file('', true)},
|
||||
},
|
||||
},
|
||||
})
|
||||
@ -28,7 +28,7 @@ if nvim_lspconfig then
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition)
|
||||
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action)
|
||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
|
||||
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format({ async = true }) end)
|
||||
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format({async = true}) end)
|
||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist)
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename)
|
||||
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder)
|
||||
@ -57,8 +57,8 @@ if nvim_cmp then
|
||||
['<tab>'] = nvim_cmp.mapping.confirm({ select = true }),
|
||||
},
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'vsnip' },
|
||||
{name = 'nvim_lsp'},
|
||||
{name = 'vsnip'},
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args) vim.fn['vsnip#anonymous'](args.body) end,
|
||||
|
@ -4,6 +4,22 @@ vim.keymap.set('n', '<leader>fh', vim.cmd.History)
|
||||
vim.keymap.set('n', '<leader>fb', vim.cmd.Buffers)
|
||||
vim.keymap.set('n', '<leader>fl', vim.cmd.Lines)
|
||||
|
||||
vim.g.fzf_colors = {
|
||||
['bg'] = {'bg', 'Normal'},
|
||||
['bg+'] = {'bg', 'CursorLine', 'CursorColumn'},
|
||||
['border'] = {'fg', 'Ignore'},
|
||||
['fg'] = {'fg', 'Normal'},
|
||||
['fg+'] = {'fg', 'CursorLine', 'CursorColumn', 'Normal'},
|
||||
['header'] = {'fg', 'Comment'},
|
||||
['hl'] = {'fg', 'Comment'},
|
||||
['hl+'] = {'fg', 'Statement'},
|
||||
['info'] = {'fg', 'PreProc'},
|
||||
['marker'] = {'fg', 'Keyword'},
|
||||
['pointer'] = {'fg', 'Exception'},
|
||||
['prompt'] = {'fg', 'Conditional'},
|
||||
['spinner'] = {'fg', 'Label'},
|
||||
}
|
||||
|
||||
-- hflip.nvim
|
||||
vim.keymap.set('n', 'gfs', vim.cmd.HFlip)
|
||||
|
||||
@ -33,8 +49,8 @@ vim.g.go_null_module_warning = 0
|
||||
vim.g.go_version_warning = 0
|
||||
|
||||
-- vim-interestingwords
|
||||
vim.g.interestingWordsGUIColors = { '#8ccbea', '#a4e57e', '#ffdb72', '#ff7272', '#ffb3ff', '#9999ff' }
|
||||
vim.g.interestingWordsTermColors = { '154', '121', '211', '137', '214', '222' }
|
||||
vim.g.interestingWordsGUIColors = {'#8ccbea', '#a4e57e', '#ffdb72', '#ff7272', '#ffb3ff', '#9999ff'}
|
||||
vim.g.interestingWordsTermColors = {'154', '121', '211', '137', '214', '222'}
|
||||
|
||||
-- vim-polyglot
|
||||
vim.g.rustfmt_autosave = 1
|
||||
|
@ -2,5 +2,5 @@
|
||||
vim.api.nvim_create_user_command(
|
||||
'UnAlign',
|
||||
function(ctx) vim.cmd(ctx.line1 .. ',' .. ctx.line2 .. 's/\\(\\S\\+\\)\\s\\{2,\\}/\\1 /g') end,
|
||||
{ range = '%' }
|
||||
{range = '%'}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user