10 files changed,
0 insertions(+),
195 deletions(-)
Author:
Smirnov Olexander
ss2316544@gmail.com
Committed at:
2022-04-29 21:59:21 +0300
Parent:
c82a8ff
D
@@ -1,18 +0,0 @@
-return function(client, bufnr) - vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") - client.resolved_capabilities.document_formatting = false - client.resolved_capabilities.document_range_formatting = false - - local function buf_map(...) - vim.api.nvim_buf_set_keymap(bufnr, "n", ...) - end - - local opts = { noremap = true, silent = true } - buf_map("K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts) - buf_map("gd", "<cmd>Telescope lsp_definitions<CR>", opts) - buf_map("gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts) - buf_map("gr", "<cmd>Telescope lsp_references<CR>", opts) - buf_map("gi", "<cmd>Telescope lsp_implementations<CR>", opts) - buf_map("gs", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts) - buf_map("gl", "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>", opts) -end
D
@@ -1,49 +0,0 @@
-local border = { - { "", "FloatBorder" }, - { "", "FloatBorder" }, - { "", "FloatBorder" }, - { "", "FloatBorder" }, - { "", "FloatBorder" }, - { "", "FloatBorder" }, - { "", "FloatBorder" }, - { "", "FloatBorder" }, -} - -local diagnostic = { - virtual_text = true, - update_in_insert = false, - underline = true, - severity_sort = false, - signs = { - active = { - { name = "DiagnosticSignError", text = "" }, - { name = "DiagnosticSignWarn", text = "" }, - { name = "DiagnosticSignHint", text = "" }, - { name = "DiagnosticSignInfo", text = "" }, - }, - }, - float = { - focusable = true, - style = "minimal", - border = border, - source = "always", - header = "", - prefix = "", - }, -} - -return function() - vim.lsp.handlers["textDocument/hover"] = - vim.lsp.with(vim.lsp.handlers.hover, { - border = border, - }) - - vim.diagnostic.config(diagnostic) - for _, sign in ipairs(diagnostic.signs.active) do - vim.fn.sign_define(sign.name, { - texthl = sign.name, - text = sign.text, - numhl = "", - }) - end -end
D
@@ -1,19 +0,0 @@
-local M = {} - -function M.setup() - require "fk.lsp.diagnostic"() - require("fidget").setup() - require "fk.lsp.null" - require("nvim-lsp-installer").on_server_ready(function(server) - server:setup(require "fk.lsp.providers"(server, { - on_attach = require "fk.lsp.attach", - capabilities = require("cmp_nvim_lsp").update_capabilities( - vim.lsp.protocol.make_client_capabilities() - ), - flags = { debounce_text_changes = 150 }, - })) - vim.cmd [[ do User LspAttachBuffers ]] - end) -end - -return M
D
@@ -1,20 +0,0 @@
-local null_ls = require "null-ls" -local formatting = null_ls.builtins.formatting -local diagnostic = null_ls.builtins.diagnostics -local code_actions = null_ls.builtins.code_actions - -null_ls.setup { - sources = { - code_actions.gitrebase, - - formatting.stylua, - diagnostic.selene, - formatting.gofumpt, - formatting.goimports, - -- diagnostic.golangci_lint, - formatting.black, - formatting.isort, - diagnostic.flake8, - formatting.rustfmt, - }, -}
D
@@ -1,26 +0,0 @@
----@param server Server ----@param opts table ----@return table -return function(server, opts) - if server.name == "sumneko_lua" then - return vim.tbl_extend( - "force", - opts, - require("lua-dev").setup { lspconfig = server:get_default_options() } - ) - end - - if server.name == "pyright" then - return vim.tbl_extend("force", opts, require "fk.lsp.providers.pyright") - end - - if server.name == "gopls" then - return vim.tbl_extend("force", opts, require "fk.lsp.providers.gopls") - end - - if server.name == "yamlls" then - return vim.tbl_extend("force", opts, require "fk.lsp.providers.yamlls") - end - - return opts -end