aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins
diff options
context:
space:
mode:
authorawy <awy@awy.one>2025-07-29 03:42:18 +0300
committerawy <awy@awy.one>2025-07-29 03:42:18 +0300
commitef6dff4cce15186a66ba34cdd7bd39958ebf7f58 (patch)
treefcfa61164ca6e79c900b5d11f6afc6b46aaccb84 /.config/nvim/lua/plugins
downloadhyprdots-ef6dff4cce15186a66ba34cdd7bd39958ebf7f58.tar.gz
first commit
Diffstat (limited to '.config/nvim/lua/plugins')
-rw-r--r--.config/nvim/lua/plugins/completions.lua42
-rw-r--r--.config/nvim/lua/plugins/gitsigns.lua6
-rw-r--r--.config/nvim/lua/plugins/gruvbox.lua9
-rw-r--r--.config/nvim/lua/plugins/lsp-config.lua67
-rw-r--r--.config/nvim/lua/plugins/lualine.lua8
-rw-r--r--.config/nvim/lua/plugins/neotree.lua15
-rw-r--r--.config/nvim/lua/plugins/telescope.lua25
-rw-r--r--.config/nvim/lua/plugins/treesitter.lua31
-rw-r--r--.config/nvim/lua/plugins/trim.lua6
9 files changed, 209 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/completions.lua b/.config/nvim/lua/plugins/completions.lua
new file mode 100644
index 0000000..ff8fd40
--- /dev/null
+++ b/.config/nvim/lua/plugins/completions.lua
@@ -0,0 +1,42 @@
+return {
+ {
+ "hrsh7th/cmp-nvim-lsp"
+ },
+ {
+ "L3MON4D3/LuaSnip",
+ dependencies = {
+ "saadparwaiz1/cmp_luasnip",
+ "rafamadriz/friendly-snippets"
+ }
+ },
+ {
+ "hrsh7th/nvim-cmp",
+ config = function()
+ local cmp = require'cmp'
+ cmp.setup({
+ snippet = {
+ expand = function(args)
+ require('luasnip').lsp_expand(args.body)
+ end,
+ },
+ window = {
+ -- completion = cmp.config.window.bordered(),
+ -- documentation = cmp.config.window.bordered(),
+ },
+ 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 }),
+ }),
+ sources = cmp.config.sources({
+ { name = 'nvim_lsp' },
+ { name = 'luasnip' },
+ }, {
+ { name = 'buffer' },
+ })
+ })
+ end
+ }
+}
diff --git a/.config/nvim/lua/plugins/gitsigns.lua b/.config/nvim/lua/plugins/gitsigns.lua
new file mode 100644
index 0000000..8fcc21f
--- /dev/null
+++ b/.config/nvim/lua/plugins/gitsigns.lua
@@ -0,0 +1,6 @@
+return {
+ "lewis6991/gitsigns.nvim",
+ config = function()
+ require("gitsigns").setup()
+ end,
+}
diff --git a/.config/nvim/lua/plugins/gruvbox.lua b/.config/nvim/lua/plugins/gruvbox.lua
new file mode 100644
index 0000000..ecd9b49
--- /dev/null
+++ b/.config/nvim/lua/plugins/gruvbox.lua
@@ -0,0 +1,9 @@
+return {
+ "ellisonleao/gruvbox.nvim",
+ config = function()
+ require("gruvbox").setup({
+ transparent_mode = true,
+ })
+ vim.cmd.colorscheme "gruvbox"
+ end,
+}
diff --git a/.config/nvim/lua/plugins/lsp-config.lua b/.config/nvim/lua/plugins/lsp-config.lua
new file mode 100644
index 0000000..4a55fc8
--- /dev/null
+++ b/.config/nvim/lua/plugins/lsp-config.lua
@@ -0,0 +1,67 @@
+return {
+ {
+ "neovim/nvim-lspconfig",
+ config = function()
+ local capabilities = require('cmp_nvim_lsp').default_capabilities()
+ local lspconfig = require("lspconfig")
+ lspconfig.clangd.setup({
+ capabilities = capabilities,
+ })
+ lspconfig.rust_analyzer.setup({
+ settings = {
+ ["rust-analyzer"] = {
+ cargo = { allFeatures = true },
+ }
+ }
+ })
+ lspconfig.lua_ls.setup({
+ capabilities = capabilities,
+ })
+ lspconfig.html.setup({
+ capabilities = capabilities,
+ })
+ lspconfig.cssls.setup({
+ capabilities = capabilities,
+ })
+ lspconfig.jsonls.setup({
+ capabilities = capabilities,
+ })
+ lspconfig.yamlls.setup({
+ settings = {
+ yaml = {
+ -- schemas = {
+ -- ["https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.17.0-standalone-strict/all.json"] = "/*.k8s.yaml",
+ -- }
+ schemas = {
+ kubernetes = "*.yaml",
+ ["http://json.schemastore.org/github-workflow"] = ".github/workflows/*",
+ ["http://json.schemastore.org/github-action"] = ".github/action.{yml,yaml}",
+ ["http://json.schemastore.org/ansible-stable-2.9"] = "roles/tasks/*.{yml,yaml}",
+ ["http://json.schemastore.org/kustomization"] = "kustomization.{yml,yaml}",
+ ["http://json.schemastore.org/ansible-playbook"] = "*play*.{yml,yaml}",
+ ["http://json.schemastore.org/chart"] = "Chart.{yml,yaml}",
+ -- ["https://json.schemastore.org/gitlab-ci"] = "*gitlab-ci*.{yml,yaml}",
+ ["https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json"] = "*gitlab-ci*.{yml,yaml}",
+ ["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "*docker-compose*.{yml,yaml}",
+ ["https://raw.githubusercontent.com/argoproj/argo-workflows/master/api/jsonschema/schema.json"] = "*flow*.{yml,yaml}",
+ },
+ }
+ }
+ })
+ vim.diagnostic.config({
+ virtual_text = {
+ prefix = '',
+ spacing = 4,
+ },
+ signs = true,
+ underline = true,
+ -- update_in_insert = false,
+ severity_sort = true,
+ })
+ vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
+ vim.keymap.set("n", "<leader>gd", vim.lsp.buf.definition, {})
+ vim.keymap.set("n", "<leader>gr", vim.lsp.buf.references, {})
+ vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
+ end
+ }
+}
diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua
new file mode 100644
index 0000000..cebdf54
--- /dev/null
+++ b/.config/nvim/lua/plugins/lualine.lua
@@ -0,0 +1,8 @@
+return {
+ {
+ 'nvim-lualine/lualine.nvim',
+ config = function()
+ require('lualine').setup({})
+ end
+ }
+}
diff --git a/.config/nvim/lua/plugins/neotree.lua b/.config/nvim/lua/plugins/neotree.lua
new file mode 100644
index 0000000..ed60017
--- /dev/null
+++ b/.config/nvim/lua/plugins/neotree.lua
@@ -0,0 +1,15 @@
+return {
+ {
+ "nvim-neo-tree/neo-tree.nvim",
+ branch = "v3.x",
+ dependencies = {
+ "nvim-lua/plenary.nvim",
+ "MunifTanjim/nui.nvim",
+ "nvim-tree/nvim-web-devicons",
+ },
+ lazy = false,
+ config = function()
+ vim.keymap.set('n', '<C-n>', ':Neotree filesystem reveal left<CR>', {})
+ end
+ }
+}
diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua
new file mode 100644
index 0000000..0097f61
--- /dev/null
+++ b/.config/nvim/lua/plugins/telescope.lua
@@ -0,0 +1,25 @@
+return {
+ {
+ 'nvim-telescope/telescope.nvim', tag = '0.1.8',
+ dependencies = { 'nvim-lua/plenary.nvim' },
+ config = function()
+ local builtin = require("telescope.builtin")
+ vim.keymap.set('n', '<C-p>', builtin.find_files, {})
+ vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
+ end
+ },
+ {
+ 'nvim-telescope/telescope-ui-select.nvim',
+ config = function()
+ require("telescope").setup {
+ extensions = {
+ ["ui-select"] = {
+ require("telescope.themes").get_dropdown {
+ }
+ }
+ }
+ }
+ require("telescope").load_extension("ui-select")
+ end
+ },
+}
diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua
new file mode 100644
index 0000000..5b1e85c
--- /dev/null
+++ b/.config/nvim/lua/plugins/treesitter.lua
@@ -0,0 +1,31 @@
+return {
+ {
+ "nvim-treesitter/nvim-treesitter",
+ branch = 'master',
+ lazy = false,
+ build = ":TSUpdate",
+ config = function()
+ local config = require("nvim-treesitter.configs")
+ config.setup({
+ ensure_installed = {
+ "lua",
+ "javascript",
+ "c",
+ "cpp",
+ "go",
+ "markdown",
+ "meson",
+ "make",
+ "cmake",
+ "python",
+ "rust",
+ "yaml",
+ "toml",
+ "ron",
+ },
+ highlight = { enable = true },
+ indent = { enable = true },
+ })
+ end
+ }
+}
diff --git a/.config/nvim/lua/plugins/trim.lua b/.config/nvim/lua/plugins/trim.lua
new file mode 100644
index 0000000..f6fa98f
--- /dev/null
+++ b/.config/nvim/lua/plugins/trim.lua
@@ -0,0 +1,6 @@
+return {
+ "cappyzawa/trim.nvim",
+ config = function()
+ require("trim").setup({})
+ end
+}