summaryrefslogtreecommitdiff
path: root/config/essentials/nvim/lua/user
diff options
context:
space:
mode:
Diffstat (limited to 'config/essentials/nvim/lua/user')
-rw-r--r--config/essentials/nvim/lua/user/cmp/html.lua5
-rw-r--r--config/essentials/nvim/lua/user/init.lua1
-rw-r--r--config/essentials/nvim/lua/user/lazy.lua98
-rw-r--r--config/essentials/nvim/lua/user/packer.lua30
-rw-r--r--config/essentials/nvim/lua/user/remap.lua9
-rw-r--r--config/essentials/nvim/lua/user/treesitter.lua17
-rw-r--r--config/essentials/nvim/lua/user/zk.lua5
7 files changed, 145 insertions, 20 deletions
diff --git a/config/essentials/nvim/lua/user/cmp/html.lua b/config/essentials/nvim/lua/user/cmp/html.lua
index 69ed29d..d3c99df 100644
--- a/config/essentials/nvim/lua/user/cmp/html.lua
+++ b/config/essentials/nvim/lua/user/cmp/html.lua
@@ -2,6 +2,7 @@
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
-require'lspconfig'.html.setup {
- capabilities = capabilities,
+require 'lspconfig'.html.setup {
+ capabilities = capabilities,
+ filetypes = { "html", "php" },
}
diff --git a/config/essentials/nvim/lua/user/init.lua b/config/essentials/nvim/lua/user/init.lua
index 2f29b87..972cb67 100644
--- a/config/essentials/nvim/lua/user/init.lua
+++ b/config/essentials/nvim/lua/user/init.lua
@@ -1,5 +1,6 @@
require("user.packer")
require("user.remap")
+require("user.treesitter")
require("user.set")
require("user.cmp")
require("user.zk")
diff --git a/config/essentials/nvim/lua/user/lazy.lua b/config/essentials/nvim/lua/user/lazy.lua
new file mode 100644
index 0000000..5c3148c
--- /dev/null
+++ b/config/essentials/nvim/lua/user/lazy.lua
@@ -0,0 +1,98 @@
+local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+if not vim.loop.fs_stat(lazypath) then
+ vim.fn.system({
+ "git",
+ "clone",
+ "--filter=blob:none",
+ "https://github.com/folke/lazy.nvim.git",
+ "--branch=stable", -- latest stable release
+ lazypath,
+ })
+end
+vim.opt.rtp:prepend(lazypath)
+
+require("lazy").setup({
+ -- Example using a list of specs with the default options
+ "folke/which-key.nvim",
+
+ -- telescope
+ {
+ 'nvim-telescope/telescope.nvim',
+ tag = '0.1.4',
+ dependencies = { 'nvim-lua/plenary.nvim' }
+ },
+ "nvim-telescope/telescope-ui-select.nvim",
+ "nvim-telescope/telescope-media-files.nvim",
+
+ "nvim-telescope/telescope-symbols.nvim",
+ "theprimeagen/harpoon",
+
+ -- colors
+ "shaunsingh/nord.nvim",
+ { 'uZer/pywal16.nvim', name = 'pywal16' },
+ "norcalli/nvim-colorizer.lua",
+
+ { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' },
+ "nvim-treesitter/playground",
+
+ -- syntax
+ "sheerun/vim-polyglot",
+ "theRealCarneiro/hyprland-vim-syntax",
+
+ "mbbill/undotree",
+
+ "tpope/vim-capslock",
+ "tpope/vim-commentary",
+ -- "tpope/vim-endwise",
+ "tpope/vim-fugitive",
+ "lewis6991/gitsigns.nvim",
+ "tpope/vim-repeat",
+ "tpope/vim-surround",
+ "tpope/vim-vinegar",
+ "m4xshen/autoclose.nvim",
+
+ "christoomey/vim-tmux-navigator",
+
+ -- utils
+ "godlygeek/tabular",
+ "renerocksai/calendar-vim",
+ "ojroques/vim-oscyank",
+ "potamides/pantran.nvim",
+ "alx741/vinfo",
+
+ -- "github/copilot.vim",
+ --
+ {
+ 'https://gitlab.com/itaranto/plantuml.nvim',
+ config = function() require('plantuml').setup() end
+ },
+
+ -- objects
+ "michaeljsmith/vim-indent-object",
+
+ -- completion
+ "neovim/nvim-lspconfig",
+ "hrsh7th/nvim-cmp",
+ "hrsh7th/cmp-nvim-lua",
+ "hrsh7th/cmp-nvim-lsp",
+ "hrsh7th/cmp-buffer",
+ "hrsh7th/cmp-path",
+ "hrsh7th/cmp-cmdline",
+ "hrsh7th/cmp-nvim-lsp-signature-help",
+ "alvan/vim-closetag",
+
+ -- debugging
+ "mfussenegger/nvim-dap",
+ { "rcarriga/nvim-dap-ui", dependencies = { "mfussenegger/nvim-dap" } },
+
+ -- java
+ "mfussenegger/nvim-jdtls",
+
+ -- snippets
+ "L3MON4D3/LuaSnip",
+ "saadparwaiz1/cmp_luasnip",
+
+ -- notes
+ "renerocksai/telekasten.nvim",
+
+})
diff --git a/config/essentials/nvim/lua/user/packer.lua b/config/essentials/nvim/lua/user/packer.lua
index 36f9ec0..edb763d 100644
--- a/config/essentials/nvim/lua/user/packer.lua
+++ b/config/essentials/nvim/lua/user/packer.lua
@@ -4,11 +4,11 @@ return require('packer').startup(function(use)
-- files
use {
'nvim-telescope/telescope.nvim', tag = '0.1.2',
- requires = { {'nvim-lua/plenary.nvim'} }
+ requires = { { 'nvim-lua/plenary.nvim' } }
}
- use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
- use {'nvim-telescope/telescope-ui-select.nvim' }
- use {'nvim-telescope/telescope-media-files.nvim'}
+ use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
+ use { 'nvim-telescope/telescope-ui-select.nvim' }
+ use { 'nvim-telescope/telescope-media-files.nvim' }
use('nvim-telescope/telescope-symbols.nvim')
use('theprimeagen/harpoon')
@@ -18,20 +18,11 @@ return require('packer').startup(function(use)
use { 'uZer/pywal16.nvim', as = 'pywal16' }
use('norcalli/nvim-colorizer.lua')
- use('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'})
+ use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
use('nvim-treesitter/playground')
use('theRealCarneiro/hyprland-vim-syntax')
use('mbbill/undotree')
- use {
- "nvim-neo-tree/neo-tree.nvim",
- branch = "v3.x",
- requires = {
- "nvim-lua/plenary.nvim",
- "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
- "MunifTanjim/nui.nvim",
- }
- }
use('tpope/vim-capslock')
use('tpope/vim-commentary')
@@ -48,10 +39,17 @@ return require('packer').startup(function(use)
-- utils
use('godlygeek/tabular')
use('renerocksai/calendar-vim')
- use('ojroques/vim-oscyank', {branch = "main"})
+ use('ojroques/vim-oscyank', { branch = "main" })
use("potamides/pantran.nvim")
use('alx741/vinfo')
+ -- use('sheerun/vim-polyglot') TODO: fix error conflicting with telekasten
-- use('github/copilot.vim')
+ --
+ use {
+ 'https://gitlab.com/itaranto/plantuml.nvim',
+ tag = '*',
+ config = function() require('plantuml').setup() end
+ }
-- objects
use('michaeljsmith/vim-indent-object')
@@ -69,7 +67,7 @@ return require('packer').startup(function(use)
-- debugging
use('mfussenegger/nvim-dap')
- use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"} }
+ use { "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } }
-- java
use('mfussenegger/nvim-jdtls')
diff --git a/config/essentials/nvim/lua/user/remap.lua b/config/essentials/nvim/lua/user/remap.lua
index fadca21..0c3d9a6 100644
--- a/config/essentials/nvim/lua/user/remap.lua
+++ b/config/essentials/nvim/lua/user/remap.lua
@@ -54,9 +54,14 @@ end, { noremap = true })
-- utils
vim.keymap.set("i", "<LocalLeader>r", "<cmd>r!echo -n $RANDOM<cr><esc>kJA", { noremap = true })
+
+-- FORMATTING
-- ordered list
vim.keymap.set("n", "<LocalLeader>n", "<C-v>I0. <esc>gvg<C-a>", { noremap = true })
vim.keymap.set("v", "<Leader>u", "<cmd>'<,'>s/^[0-9]\\+\\. //<cr><esc>", { noremap = true })
+-- table
+vim.keymap.set("v", "<LocalLeader>t", "!column -t -s '|' -o '|'<cr>", { noremap = true })
+
-- scripts
vim.keymap.set("n", "<Leader>x", "<cmd>!chmod +x %<cr>", { noremap = true, silent = true})
-- replace
@@ -73,8 +78,8 @@ vim.keymap.set("n", "<LocalLeader>s", function ()
print("sourced.")
end, { noremap = true })
--- Packer
-vim.keymap.set("n", "<Leader>P", "<cmd>PackerSync<cr>", { noremap = true })
+-- Lazy
+vim.keymap.set("n", "<Leader>P", "<cmd>Lazy<cr>", { noremap = true })
-- spelling
vim.keymap.set("n", "<C-s>s", "<cmd>setlocal spell!<cr>", { noremap = true })
diff --git a/config/essentials/nvim/lua/user/treesitter.lua b/config/essentials/nvim/lua/user/treesitter.lua
new file mode 100644
index 0000000..2355215
--- /dev/null
+++ b/config/essentials/nvim/lua/user/treesitter.lua
@@ -0,0 +1,17 @@
+require'nvim-treesitter.configs'.setup {
+ -- A list of parser names, or "all" (the five listed parsers should always be installed)
+ ensure_installed = { "c", "lua", "vim", "vimdoc", "query" },
+
+ -- Install parsers synchronously (only applied to `ensure_installed`)
+ sync_install = false,
+
+ -- Automatically install missing parsers when entering buffer
+ -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
+ auto_install = true,
+
+ indent = { enable = on },
+
+ highlight = { enable = true, },
+
+ additional_vim_regex_highlighting = false,
+}
diff --git a/config/essentials/nvim/lua/user/zk.lua b/config/essentials/nvim/lua/user/zk.lua
index 98476ca..3641025 100644
--- a/config/essentials/nvim/lua/user/zk.lua
+++ b/config/essentials/nvim/lua/user/zk.lua
@@ -41,6 +41,11 @@ require("telekasten").setup({
media_previewer = "telescope-media-files",
follow_url_fallback = nil,
vaults = {
+ Ideas = {
+ home = home .. "/" .. "Ideas",
+ template_new_note = home .. "/" .. "templates/new_note.md",
+ new_note_filename = "title",
+ },
Driving = {
home = home .. "/" .. "Driving",
template_new_note = home .. "/" .. "templates/new_note.md",