small changes to config

This commit is contained in:
James Dixon 2022-12-20 22:55:50 -05:00
parent 12bf31273c
commit 1637e8df44
3 changed files with 7 additions and 13 deletions

View File

@ -9,6 +9,5 @@ require('keymaps')
-- package manager (packer.nvim) -- package manager (packer.nvim)
require('plugins') require('plugins')
-- plugin configurations
require('plugin-config') require('plugin-config')

View File

@ -13,21 +13,16 @@ local on_attach = function(_, bufnr)
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc }) vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
end end
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction') nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition') nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition')
nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition') nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
nmap('gI', vim.lsp.buf.implementation, '[G]oto [I]mplementation') nmap('gi', vim.lsp.buf.implementation, '[G]oto [I]mplementation')
-- nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
-- nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
-- nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
nmap('K', vim.lsp.buf.hover, 'Hover Documentation') nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation') nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder') nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder') nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
nmap('<leader>wl', function() nmap('<leader>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders())) print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, '[W]orkspace [L]ist Folders') end, '[W]orkspace [L]ist Folders')

View File

@ -2,10 +2,6 @@
-- general settings -- general settings
-- --
-- vim cmds
vim.cmd('syntax enable')
vim.cmd('filetype plugin indent on')
-- encoding/format -- encoding/format
vim.opt.encoding = 'utf-8' vim.opt.encoding = 'utf-8'
vim.opt.fileformats = 'unix,dos,mac' vim.opt.fileformats = 'unix,dos,mac'
@ -50,3 +46,7 @@ vim.opt.termguicolors = true
vim.opt.number = true vim.opt.number = true
vim.opt.wrap = true vim.opt.wrap = true
vim.opt.listchars = {eol = '', tab = '', trail = '·'} vim.opt.listchars = {eol = '', tab = '', trail = '·'}
-- vim cmds
vim.cmd('syntax enable')
vim.cmd('filetype plugin indent on')