summaryrefslogtreecommitdiff
path: root/after/plugin/lsp.lua
diff options
context:
space:
mode:
authortalha <talha@talhaamir.xyz>2023-11-19 13:47:03 +0500
committertalha <talha@talhaamir.xyz>2023-11-19 13:47:03 +0500
commita75d4659bfac04a1f5cad4166cc68f873768c653 (patch)
tree1e3d7f0198bd16ca3270bcb3a72955f21738971a /after/plugin/lsp.lua
Adding files for upload
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()