1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 11:24:55 +02:00

Update nvim config

This commit is contained in:
Henrik Hautakoski 2024-02-24 17:01:28 +01:00
parent 3644271f7d
commit e995f07fef
11 changed files with 114 additions and 35 deletions

View file

@ -37,3 +37,5 @@ vim.keymap.set("v", "<Right>", "", { noremap=true })
-- Make Shift-Tab undo indent.
vim.keymap.set("i", "<S-Tab>", "<C-d>")
-- NvimTree
vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<cr>", { noremap=true })

View file

@ -38,7 +38,7 @@ return {
fallback()
end
end, { "i", "s" }),
['<CR>'] = cmp.mapping.confirm({ select = false }),
['<CR>'] = cmp.mapping.confirm({ select = true }),
},
formatting = {
format = function(entry, vim_item)

View file

@ -3,9 +3,9 @@ return {
lazy = false,
opts = {
signs = {
add = { text = '+' },
delete = { text = '-' },
change = { text = '~' },
add = { text = '' },
delete = { text = '' },
change = { text = '' },
untracked = { text = '+'}
},
},

View file

@ -0,0 +1,8 @@
return {
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
opts = {},
config = function()
require("ibl").setup()
end
}

View file

@ -14,28 +14,29 @@ vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
-- Highlight
--{ import = "plugins.kodex" },
{ import = "plugins.colortheme-kanagawa" },
{ import = "plugins.indent" },
{ import = "plugins.nvim-autopairs" },
-- Filetree
{ import = "plugins.neo-tree" },
-- Status line
{ import = "plugins.lualine" },
-- Fuzzy finder
{ import = "plugins.telescope" },
{ import = "plugins.telescope" },
-- Keybind helper
-- { import = "plugins.which-key" },
{ import = "plugins.which-key" },
-- Treesitter
{ import = "plugins.treesitter" },
-- Complete
-- { import = "plugins.cmp" },
-- LSP
{ import = "plugins.lsp" },
-- Git changes in gutter
--{ import = "plugins.gitsigns" },
{ import = "plugins.gitsigns" },
})

View file

@ -9,11 +9,11 @@ return {
-- Setup Mason to automatically install LSP servers
require('mason').setup()
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())
-- PHP
require('lspconfig').intelephense.setup({
lspconfig.intelephense.setup({
commands = {
IntelephenseIndex = {
function() vim.lsp.buf.execute_command({ command = 'intelephense.index.workspace' }) end,
@ -26,6 +26,8 @@ return {
-- capabilities = capabilities
})
-- GO
lspconfig.gopls.setup({})
-- Tailwind CSS
--require('lspconfig').tailwindcss.setup({ capabilities = capabilities })

View 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 = "",
}
},
},
}
}

View file

@ -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

View file

@ -0,0 +1,5 @@
return {
'windwp/nvim-autopairs',
event = "InsertEnter",
opts = {} -- this is equalent to setup({}) function
}

View file

@ -5,10 +5,18 @@ return {
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
opts = {},
config = function()
local wk = require("which-key")
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
}