mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 03:14:55 +02:00
Update nvim config
This commit is contained in:
parent
3644271f7d
commit
e995f07fef
11 changed files with 114 additions and 35 deletions
|
|
@ -1,21 +1,27 @@
|
||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "46c91e814732c1630b8a8b50d04acbf54b8320fa" },
|
"LuaSnip": { "branch": "master", "commit": "f3b3d3446bcbfa62d638b1903ff00a78b2b730a1" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
|
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"kanagawa.nvim": { "branch": "master", "commit": "c19b9023842697ec92caf72cd3599f7dd7be4456" },
|
"gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" },
|
||||||
"lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
|
"kanagawa.nvim": { "branch": "master", "commit": "ab41956c4559c3eb21e713fcdf54cda1cb6d5f40" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" },
|
||||||
|
"lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
||||||
"lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
|
"lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
|
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "6eb8cae80f2e4322ec82cd9f8fa423f6d1eb02c3" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "21d33d69a81f6351e5a5f49078b2e4f0075c8e73" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" },
|
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
|
"neo-tree.nvim": { "branch": "main", "commit": "7d3b02073e59ed9ef271795787de76d0de8f5294" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "90a28fd7637b66e055af62387ecee06f7cbd3173" },
|
"nui.nvim": { "branch": "main", "commit": "c3c7fd618dcb5a89e443a2e1033e7d11fdb0596b" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "075a64addc33390028ea124a1046a43497f05cd1" },
|
"nvim-autopairs": { "branch": "master", "commit": "1efb4f2e754d282762a1413ea0528d9a45143cdd" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "3fafeea5f339223e888fd15eb4032260849cb038" },
|
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "b22610cc7ceb513396adb8e648abb1d1613b2a82" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "c06292fdc641d71d185d2f1a507ad8232b6cf528" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "14ac5887110b06b89a96881d534230dac3ed134d" },
|
||||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
|
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" }
|
"telescope.nvim": { "branch": "master", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
||||||
}
|
}
|
||||||
|
|
@ -37,3 +37,5 @@ vim.keymap.set("v", "<Right>", "", { noremap=true })
|
||||||
-- Make Shift-Tab undo indent.
|
-- Make Shift-Tab undo indent.
|
||||||
vim.keymap.set("i", "<S-Tab>", "<C-d>")
|
vim.keymap.set("i", "<S-Tab>", "<C-d>")
|
||||||
|
|
||||||
|
-- NvimTree
|
||||||
|
vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<cr>", { noremap=true })
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ return {
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, { "i", "s" }),
|
end, { "i", "s" }),
|
||||||
['<CR>'] = cmp.mapping.confirm({ select = false }),
|
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||||
},
|
},
|
||||||
formatting = {
|
formatting = {
|
||||||
format = function(entry, vim_item)
|
format = function(entry, vim_item)
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ return {
|
||||||
lazy = false,
|
lazy = false,
|
||||||
opts = {
|
opts = {
|
||||||
signs = {
|
signs = {
|
||||||
add = { text = '+' },
|
add = { text = '│' },
|
||||||
delete = { text = '-' },
|
delete = { text = '' },
|
||||||
change = { text = '~' },
|
change = { text = '│' },
|
||||||
untracked = { text = '+'}
|
untracked = { text = '+'}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
8
nvim/lua/plugins/indent.lua
Normal file
8
nvim/lua/plugins/indent.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
return {
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
main = "ibl",
|
||||||
|
opts = {},
|
||||||
|
config = function()
|
||||||
|
require("ibl").setup()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
@ -14,28 +14,29 @@ vim.opt.rtp:prepend(lazypath)
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
|
|
||||||
-- Highlight
|
-- Highlight
|
||||||
--{ import = "plugins.kodex" },
|
|
||||||
{ import = "plugins.colortheme-kanagawa" },
|
{ import = "plugins.colortheme-kanagawa" },
|
||||||
|
|
||||||
|
{ import = "plugins.indent" },
|
||||||
|
{ import = "plugins.nvim-autopairs" },
|
||||||
|
-- Filetree
|
||||||
|
{ import = "plugins.neo-tree" },
|
||||||
|
|
||||||
-- Status line
|
-- Status line
|
||||||
{ import = "plugins.lualine" },
|
{ import = "plugins.lualine" },
|
||||||
|
|
||||||
-- Fuzzy finder
|
-- Fuzzy finder
|
||||||
{ import = "plugins.telescope" },
|
{ import = "plugins.telescope" },
|
||||||
|
|
||||||
-- Keybind helper
|
-- Keybind helper
|
||||||
-- { import = "plugins.which-key" },
|
{ import = "plugins.which-key" },
|
||||||
|
|
||||||
-- Treesitter
|
-- Treesitter
|
||||||
{ import = "plugins.treesitter" },
|
{ import = "plugins.treesitter" },
|
||||||
|
|
||||||
-- Complete
|
|
||||||
-- { import = "plugins.cmp" },
|
|
||||||
|
|
||||||
-- LSP
|
-- LSP
|
||||||
{ import = "plugins.lsp" },
|
{ import = "plugins.lsp" },
|
||||||
|
|
||||||
-- Git changes in gutter
|
-- Git changes in gutter
|
||||||
--{ import = "plugins.gitsigns" },
|
{ import = "plugins.gitsigns" },
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,11 @@ return {
|
||||||
-- Setup Mason to automatically install LSP servers
|
-- Setup Mason to automatically install LSP servers
|
||||||
require('mason').setup()
|
require('mason').setup()
|
||||||
require('mason-lspconfig').setup({ automatic_installation = true })
|
require('mason-lspconfig').setup({ automatic_installation = true })
|
||||||
|
local lspconfig = require('lspconfig')
|
||||||
-- local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
-- local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
|
|
||||||
-- PHP
|
-- PHP
|
||||||
require('lspconfig').intelephense.setup({
|
lspconfig.intelephense.setup({
|
||||||
commands = {
|
commands = {
|
||||||
IntelephenseIndex = {
|
IntelephenseIndex = {
|
||||||
function() vim.lsp.buf.execute_command({ command = 'intelephense.index.workspace' }) end,
|
function() vim.lsp.buf.execute_command({ command = 'intelephense.index.workspace' }) end,
|
||||||
|
|
@ -26,6 +26,8 @@ return {
|
||||||
-- capabilities = capabilities
|
-- capabilities = capabilities
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- GO
|
||||||
|
lspconfig.gopls.setup({})
|
||||||
-- Tailwind CSS
|
-- Tailwind CSS
|
||||||
--require('lspconfig').tailwindcss.setup({ capabilities = capabilities })
|
--require('lspconfig').tailwindcss.setup({ capabilities = capabilities })
|
||||||
|
|
||||||
|
|
|
||||||
49
nvim/lua/plugins/neo-tree.lua
Normal file
49
nvim/lua/plugins/neo-tree.lua
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
return {
|
||||||
|
'nvim-neo-tree/neo-tree.nvim',
|
||||||
|
cmd = 'Neotree',
|
||||||
|
keys = {
|
||||||
|
{ '<leader>n', ':Neotree reveal toggle<CR>' },
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
close_if_last_window = true,
|
||||||
|
hide_root_node = true,
|
||||||
|
default_component_configs = {
|
||||||
|
indent = {
|
||||||
|
indent_size = 2,
|
||||||
|
padding = 1,
|
||||||
|
-- indent guides
|
||||||
|
with_markers = true,
|
||||||
|
indent_marker = "│",
|
||||||
|
last_indent_marker = "└",
|
||||||
|
},
|
||||||
|
icon = {
|
||||||
|
folder_closed = "",
|
||||||
|
folder_open = "",
|
||||||
|
folder_empty = "",
|
||||||
|
},
|
||||||
|
name = {
|
||||||
|
use_git_status_colors = true,
|
||||||
|
},
|
||||||
|
git_status = {
|
||||||
|
symbols = {
|
||||||
|
-- Change type
|
||||||
|
added = "",
|
||||||
|
modified = "",
|
||||||
|
deleted = "✖",
|
||||||
|
renamed = "",
|
||||||
|
-- Status type
|
||||||
|
untracked = "",
|
||||||
|
ignored = "",
|
||||||
|
unstaged = "",
|
||||||
|
staged = "",
|
||||||
|
conflict = "",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
" Exit Vim if NERDTree is the only window remaining in the only tab.
|
|
||||||
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
|
|
||||||
5
nvim/lua/plugins/nvim-autopairs.lua
Normal file
5
nvim/lua/plugins/nvim-autopairs.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
return {
|
||||||
|
'windwp/nvim-autopairs',
|
||||||
|
event = "InsertEnter",
|
||||||
|
opts = {} -- this is equalent to setup({}) function
|
||||||
|
}
|
||||||
|
|
@ -5,10 +5,18 @@ return {
|
||||||
vim.o.timeout = true
|
vim.o.timeout = true
|
||||||
vim.o.timeoutlen = 300
|
vim.o.timeoutlen = 300
|
||||||
end,
|
end,
|
||||||
opts = {
|
opts = {},
|
||||||
-- your configuration comes here
|
config = function()
|
||||||
-- or leave it empty to use the default settings
|
local wk = require("which-key")
|
||||||
-- refer to the configuration section below
|
|
||||||
}
|
wk.register({
|
||||||
|
f = {
|
||||||
|
name = "file", -- optional group name
|
||||||
|
f = { "<cmd>Telescope find_files<cr>", "Find File" }, -- create a binding with label
|
||||||
|
n = { "New File" }, -- just a label. don't create any mapping
|
||||||
|
e = "Edit File" -- same as above
|
||||||
|
},
|
||||||
|
}, { prefix = "<leader>" })
|
||||||
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue