Add sqls keymaps
This commit is contained in:
parent
b32dfb7415
commit
ae1151950e
@ -78,6 +78,7 @@ require('lspconfig')['marksman'].setup({
|
|||||||
})
|
})
|
||||||
require('lspconfig')['sqls'].setup({
|
require('lspconfig')['sqls'].setup({
|
||||||
on_attach = function(client, bufn)
|
on_attach = function(client, bufn)
|
||||||
|
on_attach(client, bufn)
|
||||||
require('sqls').on_attach(client, bufn)
|
require('sqls').on_attach(client, bufn)
|
||||||
end,
|
end,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
|
@ -31,3 +31,9 @@ elseif vim.fn.has("unix") == 1 then
|
|||||||
else
|
else
|
||||||
vim.keymap.set[''].gx = {[[<Cmd>lua print("Error: gx is not supported on this OS!")<CR>]]}
|
vim.keymap.set[''].gx = {[[<Cmd>lua print("Error: gx is not supported on this OS!")<CR>]]}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- this is needed here since it doesn't work in plugins/sqls.lua for some reason
|
||||||
|
vim.keymap.set('n', '<leader>s', [[<CMD>SqlsExecuteQuery<CR>]], { noremap = false, silent = true, desc = "[S]qls execute query under cursor" })
|
||||||
|
vim.keymap.set('n', '<leader>S', [[<CMD>SqlsExecuteQueryVertical<CR>]], { noremap = false, silent = true, desc = "[S]qls execute query under cursor in vertical split" })
|
||||||
|
vim.keymap.set('x', '<leader>s', [[<Plug>(sqls-execute-query)<CR>]], { noremap = false, silent = true, desc = "[S]qls execute selected query" })
|
||||||
|
vim.keymap.set('x', '<leader>S', [[<Plug>(sqls-execute-query-vertical)<CR>]], { noremap = false, silent = true, desc = "[S]qls execute selected query in vertical split" })
|
||||||
|
Loading…
Reference in New Issue
Block a user