diff options
| author | seth <[email protected]> | 2022-10-02 23:22:09 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2022-10-02 23:22:09 -0400 |
| commit | 0d0aa6ed2cfca22dfbb511c2c3caac1e6071b3e9 (patch) | |
| tree | 8364ee9b3870447299de880038d151aea8ba73b2 /.config/nvim/lua/getchoo/lsp/config/null_ls.lua | |
| parent | c9caf7b2f86c751a6c37130e4f2fe873dc464d99 (diff) | |
update for neovim 0.8
Diffstat (limited to '.config/nvim/lua/getchoo/lsp/config/null_ls.lua')
| -rw-r--r-- | .config/nvim/lua/getchoo/lsp/config/null_ls.lua | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/.config/nvim/lua/getchoo/lsp/config/null_ls.lua b/.config/nvim/lua/getchoo/lsp/config/null_ls.lua index dd091a9..5fded8d 100644 --- a/.config/nvim/lua/getchoo/lsp/config/null_ls.lua +++ b/.config/nvim/lua/getchoo/lsp/config/null_ls.lua @@ -4,15 +4,15 @@ local M = {} -- only use null-ls for formatting ---- for neovim >= 8 ---- local lsp_formatting = function(bufnr) ---- vim.lsp.buf.format({ ---- filter = function(client) ---- return client.name == "null-ls" ---- end, ---- bufnr = bufnr, ---- }) ---- end +-- for neovim >= 8 +local lsp_formatting = function(bufnr) + vim.lsp.buf.format({ + filter = function(client) + return client.name == "null-ls" + end, + bufnr = bufnr, + }) +end local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) local formatting_on_attach = function(client, bufnr) @@ -22,9 +22,9 @@ local formatting_on_attach = function(client, bufnr) group = augroup, buffer = bufnr, callback = function() - local params = require("vim.lsp.util").make_formatting_params({}) - client.request("textDocument/formatting", params, nil, bufnr) - -- lsp_formatting(bufnr) -- neovim >= 8 + -- local params = require("vim.lsp.util").make_formatting_params({}) + -- client.request("textDocument/formatting", params, nil, bufnr) + lsp_formatting(bufnr) -- neovim >= 8 end, }) end |
