summaryrefslogtreecommitdiffstats
path: root/lua/tjk/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lua/tjk/plugins')
-rw-r--r--lua/tjk/plugins/alignment.lua5
-rw-r--r--lua/tjk/plugins/autoclose.lua10
-rw-r--r--lua/tjk/plugins/cmp.lua37
-rw-r--r--lua/tjk/plugins/colorizer.lua21
-rw-r--r--lua/tjk/plugins/colorscheme.lua108
-rw-r--r--lua/tjk/plugins/indentblankline.lua8
-rw-r--r--lua/tjk/plugins/lsp.lua16
-rw-r--r--lua/tjk/plugins/manageself.lua3
-rw-r--r--lua/tjk/plugins/minitab.lua5
-rw-r--r--lua/tjk/plugins/snacks.lua13
-rw-r--r--lua/tjk/plugins/tabline.lua4
-rw-r--r--lua/tjk/plugins/treesitter.lua63
-rw-r--r--lua/tjk/plugins/ui2.lua7
13 files changed, 148 insertions, 152 deletions
diff --git a/lua/tjk/plugins/alignment.lua b/lua/tjk/plugins/alignment.lua
new file mode 100644
index 0000000..c4f7fb6
--- /dev/null
+++ b/lua/tjk/plugins/alignment.lua
@@ -0,0 +1,5 @@
+return {
+ "mini.align",
+ "https://github.com/nvim-mini/mini.align",
+ setup = true,
+}
diff --git a/lua/tjk/plugins/autoclose.lua b/lua/tjk/plugins/autoclose.lua
index 32afa9f..f356f89 100644
--- a/lua/tjk/plugins/autoclose.lua
+++ b/lua/tjk/plugins/autoclose.lua
@@ -1,9 +1,7 @@
return {
- "m4xshen/autoclose.nvim", -- autoclose parenthesis
- opts = {
- options = {
- pair_spaces = true,
- },
+ "autoclose",
+ "https://github.com/m4xshen/autoclose.nvim",
+ setup = {
+ options = { pair_spaces = true },
},
- config = true,
}
diff --git a/lua/tjk/plugins/cmp.lua b/lua/tjk/plugins/cmp.lua
index 346e006..6c87867 100644
--- a/lua/tjk/plugins/cmp.lua
+++ b/lua/tjk/plugins/cmp.lua
@@ -1,30 +1,13 @@
+-- TODO replace with native cmp
return {
- "hrsh7th/nvim-cmp",
- dependencies = {
- "hrsh7th/cmp-path",
- "hrsh7th/cmp-nvim-lsp",
- "hrsh7th/cmp-buffer",
- "ray-x/cmp-treesitter",
+ "blink-cmp",
+ { src = "https://github.com/Saghen/blink.cmp", version = "v1" },
+ setup = {
+ keymap = {
+ preset = "super-tab",
+ ["<C-k>"] = { "select_prev", "fallback" },
+ ["<C-j>"] = { "select_next", "fallback" },
+ },
+ cmdline = { enabled = false },
},
- config = function()
- local cmp = require("cmp")
- cmp.setup {
- sources = {
- { name = "path" },
- { name = "lsp" },
- { name = "buffer" },
- { name = "treesitter" },
- },
- mapping = cmp.mapping.preset.insert {
- --['<C-b>'] = cmp.mapping.scroll_docs(-4),
- --['<C-f>'] = cmp.mapping.scroll_docs(4),
- --['<C-Space>'] = cmp.mapping.complete(),
- --['<C-e>'] = cmp.mapping.abort(),
- --['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
- ["<C-j>"] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Insert },
- ["<C-k>"] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Insert },
- ['<Tab>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
- },
- }
- end
}
diff --git a/lua/tjk/plugins/colorizer.lua b/lua/tjk/plugins/colorizer.lua
index 964b6f4..120fbb8 100644
--- a/lua/tjk/plugins/colorizer.lua
+++ b/lua/tjk/plugins/colorizer.lua
@@ -1,10 +1,15 @@
return {
- "norcalli/nvim-colorizer.lua", -- css color highlighter
- enabled = vim.opt.termguicolors._value,
- opts = {
- "css",
- "sass",
- "javascript",
- "html",
- }
+ "colorizer",
+ "https://github.com/catgoose/nvim-colorizer.lua",
+ setup = {
+ lazy_load = true,
+ options = {
+ parsers = {
+ css = true, -- preset: enables names, hex, rgb, hsl, oklch, css_var
+ tailwind = { enable = true, update_names = true, lsp = true }, -- tailwind + lsp context
+ xterm = { enable = true }, -- xterm 256-color codes (#xNN, \e[38;5;NNNm)
+ xcolor = { enable = true }, -- LaTeX xcolor expressions (e.g. red!30)
+ },
+ },
+ },
}
diff --git a/lua/tjk/plugins/colorscheme.lua b/lua/tjk/plugins/colorscheme.lua
index 2bffef6..4a3756d 100644
--- a/lua/tjk/plugins/colorscheme.lua
+++ b/lua/tjk/plugins/colorscheme.lua
@@ -1,67 +1,63 @@
-- use another colorscheme if running as root
if os.getenv "USER" == "root" then
vim.cmd.colorscheme "koehler"
- return {}
+ return
end
return {
- "ellisonleao/gruvbox.nvim",
- enabled = vim.opt.termguicolors._value,
- priority = 9001,
- config = function()
+ "gruvbox",
+ "https://github.com/ellisonleao/gruvbox.nvim",
+ setup = {
+ italic = {
+ strings = false,
+ emphasis = true,
+ comments = false,
+ operators = false,
+ folds = true,
+ },
+ invert_selection = true, -- swap fg w/ bg on select
+ contrast = "hard", -- preferred theme variant
+ palette_overrides = {
+ light0 = "#ffffff", -- use white instead of the default off-white for text
+ light1 = "#ffffff",
+ dark2 = "#363636", -- darker whitespace characters
+ },
+ overrides = {
+ CursorLine = { bg = "#282828" }, -- dark0 (non hard)
+ Directory = { link = "GruvboxGreenBold" },
+ -- treesitter overrides (more similar to builtin python syntax highlighting)
+ -- treesitter selectors can be overridden per language using @selector.language
+ ["@variable"] = { link = "GruvboxFg0" },
+ ["@punctuation.bracket"] = { link = "GruvboxFg0" },
+ ["@punctuation.delimiter"] = { link = "GruvboxFg0" },
+ ["@keyword.import"] = { link = "GruvboxBlue" },
+ ["@function"] = { link = "GruvboxAqua" },
+ ["@function.method"] = { link = "GruvboxAqua" },
+ ["@function.method"] = { link = "GruvboxAqua" },
+ ["@attribute.builtin"] = { link = "GruvboxGreenBold" },
+ ["@attribute"] = { link = "GruvboxGreenBold" },
+ ["@operator"] = { link = "GruvboxRed" },
+ ["@variable.member"] = { link = "GruvboxFg0" },
+ ["@variable.parameter"] = { link = "GruvboxFg0" },
+ ["@function.call"] = { link = "GruvboxPurple" },
+ ["@function.method.call"] = { link = "GruvboxPurple" },
+ -- rainbow delimiters colors
+ RainbowDelimiterRed = { fg = "#ff4433" },
+ RainbowDelimiterYellow = { fg = "#ffff22" },
+ RainbowDelimiterBlue = { fg = "#66f3ff" },
+ RainbowDelimiterOrange = { fg = "#ffaa00" },
+ RainbowDelimiterGreen = { fg = "#99ff44" },
+ RainbowDelimiterViolet = { fg = "#aa00ff" },
+ RainbowDelimiterCyan = { fg = "#22ddff" },
+ -- TODO italic string start / end
+ --["@string_start"] = { italic = true },
+ --["@string_end"] = { italic = true },
+ },
+ },
+ loadFn = function()
+ -- use dark gruvbox variant
vim.o.background = "dark"
- local gruvbox = require("gruvbox")
- local colors = gruvbox.palette
-
- gruvbox.setup({
- italic = {
- strings = false,
- emphasis = true,
- comments = false,
- operators = false,
- folds = true,
- },
- invert_selection = true,
- contrast = "hard",
- palette_overrides = {
- light0 = "#ffffff", -- use white instead of the default off-white for text
- light1 = "#ffffff",
- dark2 = "#363636", -- darker whitespace characters
- },
- overrides = {
- CursorLine = { bg = "#282828" }, -- dark0 (non hard)
- Directory = { link = "GruvboxGreenBold" },
- -- treesitter overrides (more similar to builtin python syntax highlighting)
- -- treesitter selectors can be overridden per language using @selector.language
- ["@variable"] = { link = "GruvboxFg0" },
- ["@punctuation.bracket"] = { link = "GruvboxFg0" },
- ["@punctuation.delimiter"] = { link = "GruvboxFg0" },
- ["@keyword.import"] = { link = "GruvboxBlue" },
- ["@function"] = { link = "GruvboxAqua" },
- ["@function.method"] = { link = "GruvboxAqua" },
- ["@function.method"] = { link = "GruvboxAqua" },
- ["@attribute.builtin"] = { link = "GruvboxGreenBold" },
- ["@attribute"] = { link = "GruvboxGreenBold" },
- ["@operator"] = { link = "GruvboxRed" },
- ["@variable.member"] = { link = "GruvboxFg0" },
- ["@variable.parameter"] = { link = "GruvboxFg0" },
- ["@function.call"] = { link = "GruvboxPurple" },
- ["@function.method.call"] = { link = "GruvboxPurple" },
- -- rainbow delimiters colors
- RainbowDelimiterRed = { fg = "#ff4433" },
- RainbowDelimiterYellow = { fg = "#ffff22" },
- RainbowDelimiterBlue = { fg = "#66f3ff" },
- RainbowDelimiterOrange = { fg = "#ffaa00" },
- RainbowDelimiterGreen = { fg = "#99ff44" },
- RainbowDelimiterViolet = { fg = "#aa00ff" },
- RainbowDelimiterCyan = { fg = "#22ddff" },
- -- TODO italic string start / end
- --["@string_start"] = { italic = true },
- --["@string_end"] = { italic = true },
- },
- })
-
-- set colorscheme
vim.cmd.colorscheme "gruvbox"
diff --git a/lua/tjk/plugins/indentblankline.lua b/lua/tjk/plugins/indentblankline.lua
deleted file mode 100644
index 826f1ae..0000000
--- a/lua/tjk/plugins/indentblankline.lua
+++ /dev/null
@@ -1,8 +0,0 @@
-return {
- "lukas-reineke/indent-blankline.nvim",
- enabled = vim.opt.termguicolors._value,
- main = "ibl",
- opts = {
- scope = { enabled = false };
- }
-}
diff --git a/lua/tjk/plugins/lsp.lua b/lua/tjk/plugins/lsp.lua
deleted file mode 100644
index 050a5a6..0000000
--- a/lua/tjk/plugins/lsp.lua
+++ /dev/null
@@ -1,16 +0,0 @@
-return {
- "neovim/nvim-lspconfig",
- dependencies = {
- "williamboman/mason.nvim", -- install lsp's
- "williamboman/mason-lspconfig.nvim",
- },
- config = function()
- require("mason").setup()
- require("mason-lspconfig").setup { automatic_installation = true }
- local lspconfig = require("lspconfig")
- lspconfig.pylsp.setup {
- autostart = false,
- capabilities = require("cmp_nvim_lsp").default_capabilities()
- }
- end
-}
diff --git a/lua/tjk/plugins/manageself.lua b/lua/tjk/plugins/manageself.lua
deleted file mode 100644
index 098c300..0000000
--- a/lua/tjk/plugins/manageself.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-return {
- "folke/lazy.nvim", -- so lazy can manage itself
-}
diff --git a/lua/tjk/plugins/minitab.lua b/lua/tjk/plugins/minitab.lua
new file mode 100644
index 0000000..cdc6052
--- /dev/null
+++ b/lua/tjk/plugins/minitab.lua
@@ -0,0 +1,5 @@
+return {
+ "minitab",
+ "https://git.tjkeller.xyz/minitab.nvim",
+ setup = true,
+}
diff --git a/lua/tjk/plugins/snacks.lua b/lua/tjk/plugins/snacks.lua
new file mode 100644
index 0000000..8444595
--- /dev/null
+++ b/lua/tjk/plugins/snacks.lua
@@ -0,0 +1,13 @@
+return {
+ "snacks",
+ "https://github.com/folke/snacks.nvim",
+ setup = {
+ indent = {
+ enabled = true,
+ only_scope = true,
+ animate = { enabled = false },
+ scope = { enabled = false },
+ },
+ quickfile = { enabled = true },
+ },
+}
diff --git a/lua/tjk/plugins/tabline.lua b/lua/tjk/plugins/tabline.lua
deleted file mode 100644
index dbac957..0000000
--- a/lua/tjk/plugins/tabline.lua
+++ /dev/null
@@ -1,4 +0,0 @@
-return {
- url = "https://git.tjkeller.xyz/minitab.nvim",
- config = true,
-}
diff --git a/lua/tjk/plugins/treesitter.lua b/lua/tjk/plugins/treesitter.lua
index 835e1af..b7a8d94 100644
--- a/lua/tjk/plugins/treesitter.lua
+++ b/lua/tjk/plugins/treesitter.lua
@@ -1,30 +1,45 @@
return {
- "nvim-treesitter/nvim-treesitter",
- build = ":TSUpdate",
- dependencies = {
- --{
- -- "nvim-treesitter/playground", -- inspect treesitter structure
- -- cmd = "TSPlaygroundToggle"
- --},
- "HiPhish/rainbow-delimiters.nvim", -- colored delimiters per scope level
+ "nvim-treesitter",
+ "https://github.com/nvim-treesitter/nvim-treesitter",
+ setup = {
+ highlight = { enable = true, disable = { "yaml", "dockerfile" } },
+ --indent = { enable = true }, -- FIXME
+ },
+ dependents = {
+ {
+ "nvim-ts-autotag",
+ "https://github.com/windwp/nvim-ts-autotag",
+ setup = {
+ per_filetype = { ["html"] = { enable_close = true } },
+ },
+ },
+ {
+ "rainbow-delimiters.setup",
+ "https://github.com/HiPhish/rainbow-delimiters.nvim",
+ },
{
- "windwp/nvim-ts-autotag", -- close tags in html/xml type languages
- opts = {
- per_filetype = {
- ["html"] = { enable_close = true },
- }
- }
+ "tree-sitter-jinja2",
+ "https://github.com/geigerzaehler/tree-sitter-jinja2",
+ setup = true,
},
},
- config = function()
- local configs = require("nvim-treesitter.configs")
- configs.setup({
- ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "comment",
- "javascript", "html", "css", "scss", "python", "php" },
- auto_install = true, -- install available parsers when entering new buffers
- highlight = { enable = true, disable = { "yaml" } },
- indent = { enable = true, disable = { "yaml" } },
- --playground = { enable = true }, -- treesitter debug
+ loadFn = function()
+ vim.g._ts_force_sync_parsing = true -- #32660
+
+ vim.api.nvim_create_autocmd("FileType", {
+ callback = function()
+ -- highlight
+ local ok, err = pcall(vim.treesitter.start)
+ if not ok then
+ return
+ end
+ vim.bo.syntax = "" -- disable legacy syntax for this buffer
+ -- folding
+ --vim.wo[0][0].foldexpr = 'v:lua.vim.treesitter.foldexpr()'
+ --vim.wo[0][0].foldmethod = 'expr'
+ -- indentation
+ vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
+ end,
})
- end
+ end,
}
diff --git a/lua/tjk/plugins/ui2.lua b/lua/tjk/plugins/ui2.lua
new file mode 100644
index 0000000..5d1dc9e
--- /dev/null
+++ b/lua/tjk/plugins/ui2.lua
@@ -0,0 +1,7 @@
+return {
+ "vim._core.ui2",
+ source = nil,
+ setup = {
+ enable = true,
+ },
+}