From a75d4659bfac04a1f5cad4166cc68f873768c653 Mon Sep 17 00:00:00 2001 From: talha Date: Sun, 19 Nov 2023 13:47:03 +0500 Subject: Adding files for upload --- after/plugin/lsp.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 after/plugin/lsp.lua (limited to 'after/plugin/lsp.lua') 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() -- cgit v1.2.3