diff options
Diffstat (limited to 'neovim/.config/nvim/lua/plugins')
-rw-r--r-- | neovim/.config/nvim/lua/plugins/cspell.lua | 19 | ||||
-rw-r--r-- | neovim/.config/nvim/lua/plugins/goyo.lua | 8 | ||||
-rw-r--r-- | neovim/.config/nvim/lua/plugins/lualine.lua (renamed from neovim/.config/nvim/lua/plugins/galaxyline.lua) | 7 | ||||
-rw-r--r-- | neovim/.config/nvim/lua/plugins/neogit.lua | 8 | ||||
-rw-r--r-- | neovim/.config/nvim/lua/plugins/noice.lua | 94 | ||||
-rw-r--r-- | neovim/.config/nvim/lua/plugins/nvim_cmp.lua | 21 | ||||
-rw-r--r-- | neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua | 19 | ||||
-rw-r--r-- | neovim/.config/nvim/lua/plugins/tabby.lua | 1 | ||||
-rw-r--r-- | neovim/.config/nvim/lua/plugins/vim_svelte_plugin.lua | 6 |
9 files changed, 166 insertions, 17 deletions
diff --git a/neovim/.config/nvim/lua/plugins/cspell.lua b/neovim/.config/nvim/lua/plugins/cspell.lua new file mode 100644 index 0000000..7293326 --- /dev/null +++ b/neovim/.config/nvim/lua/plugins/cspell.lua @@ -0,0 +1,19 @@ +return { + { + 'nvimtools/none-ls.nvim', + dependencies = { + { + 'davidmh/cspell.nvim', + }, + }, + config = function () + local cspell = require('cspell') + require('null-ls').setup { + sources = { + cspell.diagnostics, + cspell.code_actions, + } + } + end, + } +} diff --git a/neovim/.config/nvim/lua/plugins/goyo.lua b/neovim/.config/nvim/lua/plugins/goyo.lua index bfe797a..3b2f57f 100644 --- a/neovim/.config/nvim/lua/plugins/goyo.lua +++ b/neovim/.config/nvim/lua/plugins/goyo.lua @@ -17,11 +17,7 @@ return { vim.opt.scrolloff = 999 vim.opt.laststatus = 0 - local gl = require('galaxyline') - local gls = gl.section - gls.left = {} - gls.mid = {} - gls.right = {} + require('lualine').hide() vim.cmd('Limelight') vim.cmd('VimRToggleFullscreen') @@ -36,7 +32,7 @@ return { vim.opt.showmode = true vim.opt.showcmd = true vim.opt.scrolloff = 5 - dofile(script_path() .. '../config/galaxyline.lua') + require('lualine').hide({unhide=true}) vim.opt.laststatus = 3 vim.cmd('Limelight!') vim.cmd('VimRToggleFullscreen') diff --git a/neovim/.config/nvim/lua/plugins/galaxyline.lua b/neovim/.config/nvim/lua/plugins/lualine.lua index d3f8ba7..fda2e78 100644 --- a/neovim/.config/nvim/lua/plugins/galaxyline.lua +++ b/neovim/.config/nvim/lua/plugins/lualine.lua @@ -1,7 +1,6 @@ return { { - 'nvimdev/galaxyline.nvim', - branch = 'main', + 'nvim-lualine/lualine.nvim', dependencies = { { 'nvim-tree/nvim-web-devicons', @@ -66,7 +65,7 @@ return { }, event = { 'BufEnter', 'VimEnter' }, config = function() - require('config.galaxyline') + require('config.lualine') end, - }, + } } diff --git a/neovim/.config/nvim/lua/plugins/neogit.lua b/neovim/.config/nvim/lua/plugins/neogit.lua index a0a3f90..43dcf02 100644 --- a/neovim/.config/nvim/lua/plugins/neogit.lua +++ b/neovim/.config/nvim/lua/plugins/neogit.lua @@ -7,11 +7,8 @@ return { 'sindrets/diffview.nvim', }, opts = { - disable_commit_confirmation = true, - auto_refresh = true, - kind = 'tab', commit_editor = { - kind = 'auto', + staged_diff_split_kind = "auto", }, integrations = { -- Neogit only provides inline diffs. If you want a more traditional way to look at diffs, you can use `sindrets/diffview.nvim`. @@ -26,7 +23,8 @@ return { -- } -- } -- - diffview = true + diffview = true, + telescope = true, } }, keys = { diff --git a/neovim/.config/nvim/lua/plugins/noice.lua b/neovim/.config/nvim/lua/plugins/noice.lua new file mode 100644 index 0000000..09b628e --- /dev/null +++ b/neovim/.config/nvim/lua/plugins/noice.lua @@ -0,0 +1,94 @@ +return { + { + 'folke/noice.nvim', + event = 'VeryLazy', + opts = { + lsp = { + -- override markdown rendering so that **cmp** and other plugins use **Treesitter** + override = { + ['vim.lsp.util.convert_input_to_markdown_lines'] = true, + ['vim.lsp.util.stylize_markdown'] = true, + ['cmp.entry.get_documentation'] = true, -- requires hrsh7th/nvim-cmp + }, + progress = { + enabled = false, + }, + }, + -- you can enable a preset for easier configuration + presets = { + bottom_search = true, -- use a classic bottom cmdline for search + command_palette = true, -- position the cmdline and popupmenu together + long_message_to_split = true, -- long messages will be sent to a split + inc_rename = false, -- enables an input dialog for inc-rename.nvim + lsp_doc_border = false, -- add a border to hover docs and signature help + }, + popupmenu = { + enabled = true, + backend = "nui", + }, + views = { + cmdline_popup = { + position = { + row = 5, + col = '50%', + }, + size = { + width = 60, + height = 'auto', + }, + }, + popupmenu = { + relative = 'editor', + position = { + row = 8, + col = '50%', + }, + size = { + width = 60, + height = 10, + }, + border = { + style = 'rounded', + padding = { 0, 1 }, + }, + win_options = { + winhighlight = { Normal = 'Normal', FloatBorder = 'DiagnosticInfo' }, + }, + }, + }, + routes = { + { + filter = { + event = 'lsp', + kind = 'progress', + cond = function(message) + local client = vim.tbl_get(message.opts, 'progress', 'client') + return client == 'null-ls' + end, + }, + opts = { + skip = true, + }, + }, + { + filter = { + event = 'msg_show', + kind = '', + find = 'written', + }, + opts = { + skip = true, + }, + }, + }, + }, + dependencies = { + -- if you lazy-load any plugin below, make sure to add proper `module='...'` entries + 'MunifTanjim/nui.nvim', + -- OPTIONAL: + -- `nvim-notify` is only needed, if you want to use the notification view. + -- If not available, we use `mini` as the fallback + 'rcarriga/nvim-notify', + }, + }, +} diff --git a/neovim/.config/nvim/lua/plugins/nvim_cmp.lua b/neovim/.config/nvim/lua/plugins/nvim_cmp.lua index f0a4f95..fb7aaab 100644 --- a/neovim/.config/nvim/lua/plugins/nvim_cmp.lua +++ b/neovim/.config/nvim/lua/plugins/nvim_cmp.lua @@ -40,6 +40,17 @@ return { local cmp = require('cmp') local lspkind = require('lspkind') cmp.setup({ + enabled = function() + -- disable completion in comments + local context = require 'cmp.config.context' + -- keep command mode completion enabled when cursor is in a comment + if vim.api.nvim_get_mode().mode == 'c' then + return true + else + return not context.in_treesitter_capture("comment") + and not context.in_syntax_group("Comment") + end + end, snippet = { -- REQUIRED - you must specify a snippet engine expand = function(args) @@ -88,10 +99,18 @@ return { -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline(':', { + view = { + entries = { name = 'wildmenu', separator = '|' }, + }, sources = cmp.config.sources({ { name = 'path' } }, { - { name = 'cmdline' } + { + name = 'cmdline', + option = { + ignore_cmds = { 'Man', '!' }, + }, + }, }) }) end, diff --git a/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua b/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua index 48a86c6..775dd7a 100644 --- a/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua +++ b/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua @@ -1,15 +1,21 @@ return { { + dependencies = { + { 'williamboman/mason.nvim' }, + { 'williamboman/mason-lspconfig.nvim' }, + }, 'neovim/nvim-lspconfig', lazy = false, priority = 800, config = function() + require("mason").setup() + require("mason-lspconfig").setup() local nvim_lsp = require('lspconfig') local capabilities = require('cmp_nvim_lsp').default_capabilities() -- Use a loop to conveniently call 'setup' on multiple servers and -- map buffer local keybindings when the language server attaches local servers = { "bashls", "clangd", "cssls", "dockerls", "gopls", "htmx", "jsonls", "marksman", - "phpactor", "psalm", "ruff", "rust_analyzer", "taplo", "yamlls" } + "ruff", "rust_analyzer", "taplo", "yamlls" } for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup { capabilities = capabilities, @@ -112,6 +118,17 @@ return { flags = { debounce_text_changes = 150, }, + + require 'lspconfig'.intelephense.setup { + filetypes = { 'php' }, + capabilities = capabilities, + flags = { + debounce_text_changes = 150, + }, + init_options = { + licenceKey = '~/.config/intelephense/licence.txt', + }, + } } -- Use LspAttach autocommand to only map the following keys diff --git a/neovim/.config/nvim/lua/plugins/tabby.lua b/neovim/.config/nvim/lua/plugins/tabby.lua index 0aa271e..b51c859 100644 --- a/neovim/.config/nvim/lua/plugins/tabby.lua +++ b/neovim/.config/nvim/lua/plugins/tabby.lua @@ -4,6 +4,7 @@ return { dependencies = { 'nvim-tree/nvim-web-devicons', }, + cond = function() return vim.fn.has('gui_running') == 0 end, config = function() local theme = { fill = 'TabLineFill', diff --git a/neovim/.config/nvim/lua/plugins/vim_svelte_plugin.lua b/neovim/.config/nvim/lua/plugins/vim_svelte_plugin.lua new file mode 100644 index 0000000..edcf7b6 --- /dev/null +++ b/neovim/.config/nvim/lua/plugins/vim_svelte_plugin.lua @@ -0,0 +1,6 @@ +return { + { + 'leafOfTree/vim-svelte-plugin', + ft = 'svelte', + } +} |