From c5fae2fa06aa5e9ad131366bce302df3ee3ae454 Mon Sep 17 00:00:00 2001 From: 409 Date: Wed, 31 Jul 2024 14:56:13 +0200 Subject: [PATCH] feat: added dressing --- lazy-lock.json | 2 +- lua/409/plugins/dressing.lua | 23 +++++++++++++++++++++++ lua/409/plugins/lsp.lua | 14 +++----------- lua/409/plugins/noice.lua | 25 +++++++++++++++++++------ lua/409/set.lua | 16 +++++++++------- 5 files changed, 55 insertions(+), 25 deletions(-) create mode 100644 lua/409/plugins/dressing.lua diff --git a/lazy-lock.json b/lazy-lock.json index e43bb19..9bcbdc5 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -30,7 +30,7 @@ "nvim-lspconfig": { "branch": "master", "commit": "fdc44768a09a65140aa00c92872a5381ad486485" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-tree-docs": { "branch": "master", "commit": "5db023d783da1e55339e5e25caaf72a59597e626" }, - "nvim-treesitter": { "branch": "master", "commit": "8e569bc4b5eee3ef011c948f92493fda2e2a6a32" }, + "nvim-treesitter": { "branch": "master", "commit": "65310b64eee19a6e74e1b6f607a9f46f751290fe" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "6b5f95aa4d24f2c629a74f2c935c702b08dbde62" }, "nvim-web-devicons": { "branch": "master", "commit": "5be6c4e685618b99c3210a69375b38a1202369b4" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, diff --git a/lua/409/plugins/dressing.lua b/lua/409/plugins/dressing.lua new file mode 100644 index 0000000..5b403ad --- /dev/null +++ b/lua/409/plugins/dressing.lua @@ -0,0 +1,23 @@ +return { + "stevearc/dressing.nvim", + dependencies = { + "nvim-telescope/telescope.nvim", + }, + opts = { + input = { + enabled = true, + border = "single", + }, + select = { + enabled = true, + backend = { "builtin" }, + builtin = { + show_numbers = true, + border = "single" + }, + }, + }, + config = function(_plugin, opts) + require("dressing").setup(opts) + end, +} diff --git a/lua/409/plugins/lsp.lua b/lua/409/plugins/lsp.lua index 0827600..060e4eb 100644 --- a/lua/409/plugins/lsp.lua +++ b/lua/409/plugins/lsp.lua @@ -68,7 +68,9 @@ return { "marksman", }, handlers = { - lsp.default_setup, + function(server_name) + require("lspconfig")[server_name].setup({}) + end, lua_ls = function() require("lspconfig").lua_ls.setup(lsp.nvim_lua_ls()) end, @@ -111,16 +113,6 @@ return { }, }, config = function(_, opts) - vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { - border = "single", - virtual_text = true, - silent = true, - }) - - vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { - border = "single", - }) - vim.api.nvim_create_autocmd("LspAttach", { callback = function(args) local buffer = args.buf diff --git a/lua/409/plugins/noice.lua b/lua/409/plugins/noice.lua index d705ca9..8a08bbd 100644 --- a/lua/409/plugins/noice.lua +++ b/lua/409/plugins/noice.lua @@ -1,8 +1,5 @@ return { "folke/noice.nvim", - dependencies = { - "MunifTanjim/nui.nvim", - }, event = "VeryLazy", opts = {}, config = function() @@ -13,9 +10,9 @@ return { ["vim.lsp.util.stylize_markdown"] = true, ["cmp.entry.get_documentation"] = true, }, - hover = { - silent = true, - } + hover = { + silent = true, + }, }, presets = { bottom_search = true, @@ -40,6 +37,22 @@ return { winblend = 0, }, }, + cmdline_popup = { + border = { + style = "none" + }, + }, + popup = { + border = { + style = "single", + }, + }, + confirm = { + backend = "popup", + border = { + style = "single", + }, + }, }, }) end, diff --git a/lua/409/set.lua b/lua/409/set.lua index 58d6680..7448ff5 100755 --- a/lua/409/set.lua +++ b/lua/409/set.lua @@ -1,4 +1,4 @@ -vim.opt.guicursor = '' +vim.opt.guicursor = "" vim.opt.nu = true vim.opt.relativenumber = true @@ -9,13 +9,14 @@ vim.opt.shiftwidth = 4 vim.opt.expandtab = true vim.opt.smartindent = true +vim.opt.smartcase = true vim.opt.linebreak = true vim.opt.wrap = false vim.opt.swapfile = false vim.opt.backup = false -vim.opt.undodir = os.getenv('HOME') .. '/.vim/undodir' +vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" vim.opt.undofile = true vim.opt.hlsearch = false @@ -24,16 +25,17 @@ vim.opt.incsearch = true vim.opt.termguicolors = true vim.opt.scrolloff = 8 -vim.opt.signcolumn = 'yes' -vim.opt.isfname:append('@-@') +vim.opt.signcolumn = "yes" +vim.opt.isfname:append("@-@") vim.opt.updatetime = 50 -vim.g.mapleader = ' ' +vim.g.mapleader = " " vim.g.netrw_browse_split = 0 vim.g.netrw_banner = 0 vim.g.netrw_winsize = 25 vim.opt.showmode = false -vim.opt.concealcursor='n' -vim.opt.conceallevel=2 +vim.opt.concealcursor = "n" +vim.opt.conceallevel = 2 +vim.g.lsp_zero_ui_float_border = "single"