summaryrefslogtreecommitdiff
path: root/lua/plugins
diff options
context:
space:
mode:
authorMarek Muzyka <marek@muzyka.dev>2025-11-14 19:26:59 +0100
committerMarek Muzyka <marek@muzyka.dev>2025-11-14 19:26:59 +0100
commit9e69e3554ee1dd56f055423de09a0a575fbe73b0 (patch)
tree095c62ec326a338a57b18921caaebe663eab86e1 /lua/plugins
Basic config
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/blink.lua20
-rw-r--r--lua/plugins/comment.lua5
-rw-r--r--lua/plugins/conform.lua20
-rw-r--r--lua/plugins/gruvbox.lua10
-rw-r--r--lua/plugins/lsp.lua24
-rw-r--r--lua/plugins/lualine.lua5
-rw-r--r--lua/plugins/snacks.lua11
-rw-r--r--lua/plugins/treesitter.lua11
8 files changed, 106 insertions, 0 deletions
diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua
new file mode 100644
index 0000000..cb26c56
--- /dev/null
+++ b/lua/plugins/blink.lua
@@ -0,0 +1,20 @@
+return {
+ {
+ "saghen/blink.cmp",
+ version = "*",
+ opts = {
+ keymap = { preset = "default" },
+ appearance = {
+ use_nvim_cmp_as_default = true,
+ nerd_font_variant = 'mono'
+ },
+ completion = {
+ accept = { auto_brackets = { enabled = false } },
+ menu = { border = "none" }
+ },
+ cmdline = {
+ enabled = false
+ }
+ }
+ }
+}
diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua
new file mode 100644
index 0000000..b9d7f3c
--- /dev/null
+++ b/lua/plugins/comment.lua
@@ -0,0 +1,5 @@
+return {
+ "folke/ts-comments.nvim",
+ opts = {},
+ event = "VeryLazy"
+}
diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua
new file mode 100644
index 0000000..a7db2fb
--- /dev/null
+++ b/lua/plugins/conform.lua
@@ -0,0 +1,20 @@
+return {
+ "stevearc/conform.nvim",
+ keys = {
+ {
+ "<leader>cf",
+ function()
+ require("conform").format({ async = true })
+ end,
+ mode = "",
+ desc = "Format buffer",
+ },
+ },
+ opts = {
+ formatters_by_ft = {
+ cpp = { "clang-format" },
+ ocaml = { "ocamlformat" },
+ python = { "black" }
+ },
+ }
+}
diff --git a/lua/plugins/gruvbox.lua b/lua/plugins/gruvbox.lua
new file mode 100644
index 0000000..a366335
--- /dev/null
+++ b/lua/plugins/gruvbox.lua
@@ -0,0 +1,10 @@
+return {
+ "ellisonleao/gruvbox.nvim",
+ lazy = false,
+ priority = 1000,
+ opts = { transparent_mode = true },
+ config = function(_, opts)
+ require("gruvbox").setup(opts)
+ vim.cmd.colorscheme("gruvbox")
+ end
+}
diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua
new file mode 100644
index 0000000..e0340bd
--- /dev/null
+++ b/lua/plugins/lsp.lua
@@ -0,0 +1,24 @@
+return {
+ "neovim/nvim-lspconfig",
+ opts = {
+ servers = {
+ clangd = {},
+ ocamllsp = {},
+ pylsp = {}
+ }
+ },
+ config = function(_, opts)
+ local lspconfig = require("lspconfig")
+ local on_attach = function(client, bufnr)
+ local opts = { buffer = bufnr }
+ vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
+ vim.keymap.set("n", "<leader>cr", vim.lsp.buf.rename, opts)
+ end
+ for server, config in pairs(opts.servers) do
+ config.on_attach = on_attach
+ config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities)
+ vim.lsp.config(server, config)
+ vim.lsp.enable(server)
+ end
+ end
+}
diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua
new file mode 100644
index 0000000..4c5111f
--- /dev/null
+++ b/lua/plugins/lualine.lua
@@ -0,0 +1,5 @@
+return {
+ "nvim-lualine/lualine.nvim",
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ opts = {}
+}
diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua
new file mode 100644
index 0000000..25848cd
--- /dev/null
+++ b/lua/plugins/snacks.lua
@@ -0,0 +1,11 @@
+return {
+ "folke/snacks.nvim",
+ opts = {
+ picker = {}
+ },
+ keys = {
+ { "<leader>ff", function() Snacks.picker.files() end },
+ { "<leader>fb", function() Snacks.picker.buffers({ focus = "list" }) end },
+ { "<leader>fc", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end }
+ }
+}
diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua
new file mode 100644
index 0000000..d42aca5
--- /dev/null
+++ b/lua/plugins/treesitter.lua
@@ -0,0 +1,11 @@
+return {
+ "nvim-treesitter/nvim-treesitter",
+ config = function()
+ require"nvim-treesitter.configs".setup({
+ ensure_installed = { "cpp", "ocaml", "python" },
+ highlight = {
+ enable = true,
+ }
+ })
+ end
+}