summaryrefslogtreecommitdiff
path: root/neovim/.config/nvim/lua/plugins
diff options
context:
space:
mode:
authorMichaël Ball <michael.ball@krotosaudio.com>2024-08-23 09:36:12 +0100
committerMichaël Ball <michael.ball@krotosaudio.com>2024-08-23 09:36:12 +0100
commitac7583b0fbaa84c04164b3746b099407d9ff255e (patch)
treef704151fd9300047b83ab4036bf097d1cbb9c05f /neovim/.config/nvim/lua/plugins
parent34d996020d70035cd84cd359ab06a19f91e3fb1c (diff)
Neovim changes
Diffstat (limited to 'neovim/.config/nvim/lua/plugins')
-rw-r--r--neovim/.config/nvim/lua/plugins/galaxyline.lua36
-rw-r--r--neovim/.config/nvim/lua/plugins/goyo.lua2
-rw-r--r--neovim/.config/nvim/lua/plugins/indent_blankline.lua2
-rw-r--r--neovim/.config/nvim/lua/plugins/lspsaga.lua3
-rw-r--r--neovim/.config/nvim/lua/plugins/nvim_cmp.lua17
-rw-r--r--neovim/.config/nvim/lua/plugins/nvim_colorizer.lua9
-rw-r--r--neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua15
-rw-r--r--neovim/.config/nvim/lua/plugins/tabby.lua27
-rw-r--r--neovim/.config/nvim/lua/plugins/vim_jinja2_syntax.lua6
-rw-r--r--neovim/.config/nvim/lua/plugins/vim_prettier.lua6
10 files changed, 98 insertions, 25 deletions
diff --git a/neovim/.config/nvim/lua/plugins/galaxyline.lua b/neovim/.config/nvim/lua/plugins/galaxyline.lua
index 1143b60..ad62a87 100644
--- a/neovim/.config/nvim/lua/plugins/galaxyline.lua
+++ b/neovim/.config/nvim/lua/plugins/galaxyline.lua
@@ -7,6 +7,15 @@ return {
'nvim-tree/nvim-web-devicons',
},
{
+ "catppuccin/nvim",
+ name = "catppuccin",
+ priority = 1000,
+ lazy = false,
+ opts = {
+ term_colors = true,
+ },
+ },
+ {
'navarasu/onedark.nvim',
lazy = false,
priority = 1000,
@@ -15,18 +24,29 @@ return {
},
},
{
+ 'nyoom-engineering/oxocarbon.nvim',
+ lazy = false,
+ priority = 1000,
+ },
+ {
+ "folke/tokyonight.nvim",
+ lazy = false,
+ priority = 1000,
+ opts = {},
+ },
+ {
'lunacookies/vim-colors-xcode',
lazy = false,
priority = 1000,
--config = function()
- --local colorscheme_rules_augroup = vim.api.nvim_create_augroup('Colors', {})
- --vim.api.nvim_create_autocmd({ 'ColorScheme' }, {
- --pattern = { '*' },
- --group = colorscheme_rules_augroup,
- --callback = function()
- --vim.api.nvim_set_hl(0, 'WinSeparator', { link = 'VertSplit', force = 1, default = 1 })
- --end,
- --})
+ --local colorscheme_rules_augroup = vim.api.nvim_create_augroup('Colors', {})
+ --vim.api.nvim_create_autocmd({ 'ColorScheme' }, {
+ --pattern = { '*' },
+ --group = colorscheme_rules_augroup,
+ --callback = function()
+ --vim.api.nvim_set_hl(0, 'WinSeparator', { link = 'VertSplit', force = 1, default = 1 })
+ --end,
+ --})
--end,
dependencies = {
{
diff --git a/neovim/.config/nvim/lua/plugins/goyo.lua b/neovim/.config/nvim/lua/plugins/goyo.lua
index dba0f39..bfe797a 100644
--- a/neovim/.config/nvim/lua/plugins/goyo.lua
+++ b/neovim/.config/nvim/lua/plugins/goyo.lua
@@ -37,7 +37,7 @@ return {
vim.opt.showcmd = true
vim.opt.scrolloff = 5
dofile(script_path() .. '../config/galaxyline.lua')
- vim.opt.laststatus = 2
+ vim.opt.laststatus = 3
vim.cmd('Limelight!')
vim.cmd('VimRToggleFullscreen')
end
diff --git a/neovim/.config/nvim/lua/plugins/indent_blankline.lua b/neovim/.config/nvim/lua/plugins/indent_blankline.lua
index 5feea4d..a59a3a6 100644
--- a/neovim/.config/nvim/lua/plugins/indent_blankline.lua
+++ b/neovim/.config/nvim/lua/plugins/indent_blankline.lua
@@ -6,7 +6,7 @@ return {
indent = { char = '▏' },
scope = {
enabled = true,
- char = '▎'
+ -- char = '▎'
},
},
},
diff --git a/neovim/.config/nvim/lua/plugins/lspsaga.lua b/neovim/.config/nvim/lua/plugins/lspsaga.lua
index f9414e8..53bff94 100644
--- a/neovim/.config/nvim/lua/plugins/lspsaga.lua
+++ b/neovim/.config/nvim/lua/plugins/lspsaga.lua
@@ -9,6 +9,9 @@ return {
symbol_in_winbar = {
respect_root = true,
},
+ lightbulb = {
+ virtual_text = false,
+ }
},
keys = {
{ "gh", "<cmd>Lspsaga finder<CR>", desc = "Lspsaga finder" },
diff --git a/neovim/.config/nvim/lua/plugins/nvim_cmp.lua b/neovim/.config/nvim/lua/plugins/nvim_cmp.lua
index ad626ef..29ef7b6 100644
--- a/neovim/.config/nvim/lua/plugins/nvim_cmp.lua
+++ b/neovim/.config/nvim/lua/plugins/nvim_cmp.lua
@@ -31,11 +31,14 @@ return {
dependencies = {
'hrsh7th/vim-vsnip',
},
- }
+ },
+ {
+ 'onsails/lspkind.nvim',
+ },
},
config = function ()
local cmp = require('cmp')
-
+ local lspkind = require('lspkind')
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
@@ -62,6 +65,16 @@ return {
}, {
{ name = 'tmux' },
}),
+ formatting = {
+ format = lspkind.cmp_format({
+ mode = 'symbol', -- show only symbol annotations
+ maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
+ -- can also be a function to dynamically calculate max width such as
+ -- maxwidth = function() return math.floor(0.45 * vim.o.columns) end,
+ ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
+ show_labelDetails = true, -- show labelDetails in menu. Disabled by default
+ })
+ },
})
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
diff --git a/neovim/.config/nvim/lua/plugins/nvim_colorizer.lua b/neovim/.config/nvim/lua/plugins/nvim_colorizer.lua
new file mode 100644
index 0000000..28a8317
--- /dev/null
+++ b/neovim/.config/nvim/lua/plugins/nvim_colorizer.lua
@@ -0,0 +1,9 @@
+return {
+ 'norcalli/nvim-colorizer.lua',
+ main = 'colorizer',
+ opts = {
+ css = {
+ css = true,
+ },
+ },
+}
diff --git a/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua b/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua
index 75ce1ac..5c54a20 100644
--- a/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua
+++ b/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua
@@ -8,8 +8,8 @@ return {
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", "html", "htmx", "jsonls", "marksman",
- "ruff", "rust_analyzer", "yamlls" }
+ local servers = { "bashls", "clangd", "cssls", "dockerls", "gopls", "htmx", "jsonls", "marksman",
+ "phpactor", "psalm", "ruff", "rust_analyzer", "taplo", "yamlls" }
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {
capabilities = capabilities,
@@ -61,6 +61,14 @@ return {
capabilities = capabilities,
}
+ require 'lspconfig'.html.setup {
+ filetypes = { 'html', 'htmldjango' },
+ capabilities = capabilities,
+ flags = {
+ debounce_text_changes = 150,
+ },
+ }
+
require 'lspconfig'.tsserver.setup {
filetypes = { 'typescript', 'typescriptreact', 'typescript.tsx' },
capabilities = capabilities,
@@ -88,6 +96,9 @@ return {
pyflakes = {
enabled = false,
},
+ pylsp_mypy = {
+ enabled = true,
+ },
ruff = {
enabled = false,
},
diff --git a/neovim/.config/nvim/lua/plugins/tabby.lua b/neovim/.config/nvim/lua/plugins/tabby.lua
index b989ae5..0aa271e 100644
--- a/neovim/.config/nvim/lua/plugins/tabby.lua
+++ b/neovim/.config/nvim/lua/plugins/tabby.lua
@@ -4,16 +4,23 @@ return {
dependencies = {
'nvim-tree/nvim-web-devicons',
},
- config = function ()
+ config = function()
local theme = {
fill = 'TabLineFill',
-- Also you can do this: fill = { fg='#f2e9de', bg='#907aa9', style='italic' }
head = 'TabLine',
current_tab = 'TabLineSel',
tab = 'TabLine',
+ current_win = 'TabLineSel',
win = 'TabLine',
tail = 'TabLine',
}
+ require('tabby').setup({
+ option = {
+ theme = theme,
+ nerdfont = true,
+ },
+ })
require('tabby.tabline').set(function(line)
return {
{
@@ -23,7 +30,6 @@ return {
local hl = tab.is_current() and theme.current_tab or theme.tab
return {
line.sep('', hl, theme.fill),
- tab.is_current() and '' or '',
tab.number(),
tab.name(),
tab.close_btn(''),
@@ -32,10 +38,25 @@ return {
margin = ' ',
}
end),
+ line.spacer(),
+ line.wins_in_tab(line.api.get_current_tab()).foreach(function(win)
+ local hl = win.is_current() and theme.current_win or theme.win
+ return {
+ line.sep('', hl, theme.fill),
+ win.file_icon(),
+ win.buf_name(),
+ line.sep('', hl, theme.fill),
+ hl = hl,
+ margin = ' ',
+ }
+ end),
+ {
+ line.sep('', theme.tail, theme.fill),
+ },
hl = theme.fill,
}
end)
end,
- cond = function() return vim.fn.has('gui_running') == 0 end,
+ --cond = function() return vim.fn.has('gui_running') == 0 end,
},
}
diff --git a/neovim/.config/nvim/lua/plugins/vim_jinja2_syntax.lua b/neovim/.config/nvim/lua/plugins/vim_jinja2_syntax.lua
deleted file mode 100644
index eed3d6a..0000000
--- a/neovim/.config/nvim/lua/plugins/vim_jinja2_syntax.lua
+++ /dev/null
@@ -1,6 +0,0 @@
-return {
- {
- 'Glench/Vim-Jinja2-Syntax',
- ft = 'jinja',
- },
-}
diff --git a/neovim/.config/nvim/lua/plugins/vim_prettier.lua b/neovim/.config/nvim/lua/plugins/vim_prettier.lua
index f5be9c5..f4a6f8b 100644
--- a/neovim/.config/nvim/lua/plugins/vim_prettier.lua
+++ b/neovim/.config/nvim/lua/plugins/vim_prettier.lua
@@ -1,8 +1,10 @@
return {
{
'prettier/vim-prettier',
+ ft = { 'css', 'javascript', 'javascriptreact', 'json', 'markdown', 'scss', 'typescript', 'typescriptreact', 'yaml' },
keys = {
- { "<leader>p", "<cmd>PrettierAsync<CR>", desc="Run prettier" }
- }
+ { "<leader>p", "<cmd>PrettierAsync<CR>", desc = "Run prettier" },
+ { "<leader>p", "<cmd>'<,'>PrettierFragment<CR>", mode = "v", desc = "Run prettier on selection" },
+ },
},
}