summaryrefslogtreecommitdiff
path: root/after/plugin/lsp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'after/plugin/lsp.lua')
-rw-r--r--after/plugin/lsp.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua
new file mode 100644
index 0000000..0bc840d
--- /dev/null
+++ b/after/plugin/lsp.lua
@@ -0,0 +1,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()