summaryrefslogtreecommitdiff
path: root/after/plugin/lsp.lua
blob: 0bc840d1ca977bfc900464b634163c755a831bdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
local lsp = require('lsp-zero').preset({})

local function allow_format(servers)
  return function(client) return vim.tbl_contains(servers, client.name) end
end


-- TODO: add bindings to work when no lsp available, to allow normal functionality 
lsp.on_attach(function(client, bufnr)
  -- see :help lsp-zero-keybindings
  -- to learn the available actions
  lsp.default_keymaps({buffer = bufnr})

  local opts = {buffer = bufnr}
end)

lsp.setup()