lsp
This commit is contained in:
parent
7a0a7554ec
commit
7a25289673
@ -22,7 +22,8 @@ local servers = {
|
||||
'volar',
|
||||
'dockerls',
|
||||
'jsonls',
|
||||
'yamlls'
|
||||
'yamlls',
|
||||
'graphql'
|
||||
}
|
||||
|
||||
-- This function gets run when an LSP connects to a particular buffer.
|
||||
@ -76,6 +77,10 @@ mason_lspconfig.setup_handlers {
|
||||
lspconfig[server_name].setup(config)
|
||||
end
|
||||
|
||||
if server_name == 'graphql' then
|
||||
config.filetypes = { 'graphql', 'typescript', 'javascript' }
|
||||
end
|
||||
|
||||
lspconfig[server_name].setup(config)
|
||||
end
|
||||
}
|
||||
|
@ -24,7 +24,6 @@ null_ls.setup {
|
||||
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||
vim.lsp.buf.format()
|
||||
end, { desc = 'Format current buffer with LSP' })
|
||||
print(clang_format_config)
|
||||
end
|
||||
end
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
local status, telescope = pcall(require, 'telescope')
|
||||
if (not status) then return end
|
||||
|
||||
-- Configure.
|
||||
telescope.setup {
|
||||
defaults = {
|
||||
file_ignore_patterns = {
|
||||
@ -16,14 +17,18 @@ telescope.setup {
|
||||
-- See `:help telescope.builtin`
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
-- Search.
|
||||
vim.keymap.set('n', '<leader>sf', builtin.find_files)
|
||||
vim.keymap.set('n', '<leader>sw', builtin.grep_string)
|
||||
vim.keymap.set('n', '<leader>sg', builtin.live_grep)
|
||||
|
||||
-- Old files.
|
||||
vim.keymap.set('n', '<leader>?', builtin.oldfiles)
|
||||
vim.keymap.set('n', '<leader>/', function()
|
||||
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||
winblend = 10,
|
||||
previewer = false,
|
||||
})
|
||||
end)
|
||||
|
||||
-- Search current buffer.
|
||||
-- vim.keymap.set('n', '<leader>/', function()
|
||||
-- builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||
-- winblend = 10,
|
||||
-- previewer = false,
|
||||
-- })
|
||||
-- end)
|
||||
|
Loading…
Reference in New Issue
Block a user