@@ -75,39 +75,50 @@ return {
75
75
-- Rename the variable under your cursor.
76
76
-- Most Language Servers support renaming across files, etc.
77
77
map (' grn' , vim .lsp .buf .rename , ' [R]e[n]ame' )
78
+ map (' <Tab>R' , vim .lsp .buf .rename , ' [R]ename' )
78
79
79
80
-- Execute a code action, usually your cursor needs to be on top of an error
80
81
-- or a suggestion from your LSP for this to activate.
81
82
map (' gra' , vim .lsp .buf .code_action , ' [G]oto Code [A]ction' , { ' n' , ' x' })
83
+ map (' <Tab>a' , vim .lsp .buf .code_action , ' Goto Code [a]ction' , { ' n' , ' x' })
82
84
83
85
-- Find references for the word under your cursor.
84
86
map (' grr' , require (' telescope.builtin' ).lsp_references , ' [G]oto [R]eferences' )
87
+ map (' <Tab>r' , require (' telescope.builtin' ).lsp_references , ' Goto [r]eferences' )
85
88
86
89
-- Jump to the implementation of the word under your cursor.
87
90
-- Useful when your language has ways of declaring types without an actual implementation.
88
- map (' gri' , require (' telescope.builtin' ).lsp_implementations , ' [G]oto [I]mplementation' )
91
+ -- map('gri', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
89
92
90
93
-- Jump to the definition of the word under your cursor.
91
94
-- This is where a variable was first declared, or where a function is defined, etc.
92
95
-- To jump back, press <C-t>.
93
96
map (' grd' , require (' telescope.builtin' ).lsp_definitions , ' [G]oto [D]efinition' )
97
+ map (' <Tab>d' , require (' telescope.builtin' ).lsp_definitions , ' Goto [d]efinition' )
98
+ map (' <C-]>' , require (' telescope.builtin' ).lsp_definitions , ' Goto Definition' )
94
99
95
100
-- WARN: This is not Goto Definition, this is Goto Declaration.
96
101
-- For example, in C this would take you to the header.
97
- map (' grD' , vim .lsp .buf .declaration , ' [G]oto [D]eclaration' )
102
+ -- map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
98
103
99
104
-- Fuzzy find all the symbols in your current document.
100
105
-- Symbols are things like variables, functions, types, etc.
101
106
map (' gO' , require (' telescope.builtin' ).lsp_document_symbols , ' Open Document Symbols' )
107
+ map (' <Tab>b' , require (' telescope.builtin' ).lsp_document_symbols , ' Open Document Sym[b]ols' )
108
+ map (' <C-b>' , require (' telescope.builtin' ).lsp_document_symbols , ' Open Document Sym[b]ols' )
102
109
103
110
-- Fuzzy find all the symbols in your current workspace.
104
111
-- Similar to document symbols, except searches over your entire project.
105
112
map (' gW' , require (' telescope.builtin' ).lsp_dynamic_workspace_symbols , ' Open Workspace Symbols' )
113
+ map (' <Tab>W' , require (' telescope.builtin' ).lsp_dynamic_workspace_symbols , ' Open [W]orkspace Symbols' )
114
+
115
+ -- Remap 'K'
116
+ map (' <Tab>k' , vim .lsp .buf .hover , ' [k] Show Hover Information' )
106
117
107
118
-- Jump to the type of the word under your cursor.
108
119
-- Useful when you're not sure what type a variable is and you want to see
109
120
-- the definition of its *type*, not where it was *defined*.
110
- map (' grt' , require (' telescope.builtin' ).lsp_type_definitions , ' [G]oto [T]ype Definition' )
121
+ -- map('grt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition')
111
122
112
123
-- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
113
124
--- @param client vim.lsp.Client
@@ -235,6 +246,15 @@ return {
235
246
},
236
247
},
237
248
},
249
+
250
+ -- Ruby
251
+ -- rubocop = {},
252
+ standardrb = {},
253
+ ruby_lsp = {
254
+ cmd = {
255
+ ' ~/.asdf/shims/ruby-lsp' ,
256
+ },
257
+ },
238
258
}
239
259
240
260
-- Ensure the servers and tools above are installed
@@ -258,7 +278,7 @@ return {
258
278
259
279
require (' mason-lspconfig' ).setup {
260
280
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
261
- automatic_installation = false ,
281
+ automatic_installation = true ,
262
282
handlers = {
263
283
function (server_name )
264
284
local server = servers [server_name ] or {}
0 commit comments