From 5f6f65523a00f91cd02afdedcee7062655466fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Dudr?= Date: Thu, 4 May 2023 17:03:01 +0200 Subject: [PATCH] nvim: nerd fonts --- dot_config/nvim/lua/configs/packages/colors.lua | 2 +- .../nvim/lua/configs/packages/devicons.lua | 1 + dot_config/nvim/lua/configs/packages/lsp.lua | 17 +++++++++++++++-- dot_config/nvim/lua/configs/packages/misc.lua | 6 +++--- .../nvim/lua/configs/packages/neotree.lua | 6 +++--- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/dot_config/nvim/lua/configs/packages/colors.lua b/dot_config/nvim/lua/configs/packages/colors.lua index 8c71e33..328140e 100644 --- a/dot_config/nvim/lua/configs/packages/colors.lua +++ b/dot_config/nvim/lua/configs/packages/colors.lua @@ -186,7 +186,7 @@ function M.config() vim.fn.sign_define('DiagnosticSignError', { text = ' ', texthl = 'DiagnosticSignError' }) vim.fn.sign_define('DiagnosticSignWarn', { text = ' ', texthl = 'DiagnosticSignWarn' }) vim.fn.sign_define('DiagnosticSignInfo', { text = ' ', texthl = 'DiagnosticSignInfo' }) - vim.fn.sign_define('DiagnosticSignHint', { text = '', texthl = 'DiagnosticSignHint' }) + vim.fn.sign_define('DiagnosticSignHint', { text = '󰌵', texthl = 'DiagnosticSignHint' }) end, }) diff --git a/dot_config/nvim/lua/configs/packages/devicons.lua b/dot_config/nvim/lua/configs/packages/devicons.lua index 6c1561e..5917c1a 100644 --- a/dot_config/nvim/lua/configs/packages/devicons.lua +++ b/dot_config/nvim/lua/configs/packages/devicons.lua @@ -12,6 +12,7 @@ end return { 'nvim-tree/nvim-web-devicons', + dir = '/home/vladimir/devel/nvim-web-devicons', opts = { override = { xml = make_override('󰗀', 'orange', 'XML'), diff --git a/dot_config/nvim/lua/configs/packages/lsp.lua b/dot_config/nvim/lua/configs/packages/lsp.lua index de3dacc..ae48407 100644 --- a/dot_config/nvim/lua/configs/packages/lsp.lua +++ b/dot_config/nvim/lua/configs/packages/lsp.lua @@ -175,7 +175,15 @@ local function on_attach(args) -- {{{ }, } end -end -- }}} +end -- }}} + +local function make_client_capabilities() + local caps = require('cmp_nvim_lsp').default_capabilities() + local def = vim.lsp.protocol.make_client_capabilities() + caps = vim.tbl_deep_extend('keep', caps, def) + caps.workspace.didChangeWatchedFiles.dynamicRegistration = false + return caps +end local function config() -- {{{ require('neodev').setup({}) @@ -186,6 +194,11 @@ local function config() -- {{{ local nvim_lsp = require('lspconfig') + -- vim.lsp.handlers['client/registerCapability'] = function () + -- vim.print("nasrat!") + -- return vim.NIL + -- end + local servers = { -- {{{ -- powershell_es = {}, @@ -304,7 +317,7 @@ local function config() -- {{{ local mlsp = require('mason-lspconfig') local available = mlsp.get_available_servers() local ensure = {} - local capabilities = require('cmp_nvim_lsp').default_capabilities() + local capabilities = make_client_capabilities() for name, conf in pairs(servers) do conf.capabilities = capabilities nvim_lsp[name].setup(conf) diff --git a/dot_config/nvim/lua/configs/packages/misc.lua b/dot_config/nvim/lua/configs/packages/misc.lua index 0067337..5cbe7c7 100644 --- a/dot_config/nvim/lua/configs/packages/misc.lua +++ b/dot_config/nvim/lua/configs/packages/misc.lua @@ -182,9 +182,9 @@ return { mode = 'document_diagnostics', signs = { -- icons / text used for a diagnostic - error = '', - warning = '', - hint = '', + error = '󰅚', + warning = '󰀪', + hint = '󰌶', information = '', other = '', }, diff --git a/dot_config/nvim/lua/configs/packages/neotree.lua b/dot_config/nvim/lua/configs/packages/neotree.lua index 763acb9..5c45ea4 100644 --- a/dot_config/nvim/lua/configs/packages/neotree.lua +++ b/dot_config/nvim/lua/configs/packages/neotree.lua @@ -91,7 +91,7 @@ function M.config() icon = { folder_closed = '', folder_open = '', - folder_empty = 'ﰊ', + folder_empty = '󰜌', -- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there -- then these will never be used. default = '*', @@ -112,11 +112,11 @@ function M.config() added = '', -- or "✚", but this is redundant info if you use git_status_colors on the name modified = '', -- or "", but this is redundant info if you use git_status_colors on the name deleted = '', -- this can only be used in the git_status source - renamed = '', -- this can only be used in the git_status source + renamed = '󰁕', -- this can only be used in the git_status source -- Status type untracked = '', ignored = '', - unstaged = '', + unstaged = '󰄱', staged = '', conflict = '', },