1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 19:30:01 +02:00

touched the nvim, alot.

This commit is contained in:
Henrik Hautakoski 2024-03-24 17:44:01 +01:00
parent 4c1b128c96
commit 13e4207ef5
28 changed files with 288 additions and 145 deletions

View file

@ -0,0 +1,79 @@
return {
flavour = "mocha",
color_overrides = {
mocha = {
base = '#0e1019',
mantle = '#131521',
text = '#eceef4',
}
},
no_italic = true,
no_bold = true,
highlight_overrides = {
mocha = function(colors)
return {
CursorLine = { bg = colors.mantle },
-- indent lines
IblScope = { fg = colors.overlay2 },
BufferCurrent = { fg = colors.text, bg = colors.base },
BufferCurrentMod = { fg = colors.yellow, bg = colors.base },
BufferCurrentADDED = { fg = colors.green, bg = colors.base },
BufferCurrentCHANGED = { fg = colors.yellow, bg = colors.base },
BufferCurrentDELETED = { fg = colors.red, bg = colors.base },
-- LSP
LspReferenceText = { bg = colors.surface0 },
LspReferenceRead = { link = "LspReferenceText" },
LspReferenceWrite = { link = "LspReferenceText" },
-- Syntax
PreProc = { link = "Include" },
Operator = { fg = colors.rosewater },
Function = { link = "@text" },
Delimiter = { link = "@text" },
Include = { fg = colors.mauve },
Keyword = { fg = colors.yellow },
Repeat = { link = "Keyword" },
Conditional = { link = "Keyword" },
Type = { fg = colors.blue },
String = { fg = colors.lavender },
Exception = { link = "Keyword" },
["@constructor"] = { link = "Function" },
["@variable"] = { fg = colors.green },
["@variable.builtin"] = { link = "@variable" },
["@variable.parameter"] = { link = "@parameter" },
["@variable.member"] = { link = "@variable" },
["@parameter"] = { link = "@variable" },
["@keyword.function"] = { link = "Keyword" },
["@keyword.return"] = { link = "Keyword" },
["@keyword.operator"] = { link = "Keyword" },
["@property"] = { link = "@variable" },
["@tag"] = { link = "Keyword" },
["@tag.delimiter"] = { link = "@text" },
["@punctuation"] = { link = "@text" },
["@module"] = { link = "@text" },
["@punctuation.bracket"] = { link = "@punctuation" },
["@lsp.type.property"] = { link = "@variable" },
-- PHP specific
["@class_name.php"] = { link = "@text" },
["@extend_name.php"] = { link = "@text" },
["@implements_name.php"] = { link = "@text" },
["@namespace_name.php"] = { link = "@text" },
["@namespace_alias.php"] = { link = "@text" },
}
end
},
integrations = {
cmp = true,
treesitter = true,
barbar = true,
neotree = true,
noice = true,
telescope = {
enabled = true,
}
}
}

View file

@ -0,0 +1,18 @@
return {
keys = {
{ '<leader>ff', "<cmd>Format<cr>", desc = 'Format file' },
{ '<leader>ff', "<cmd>Format<cr>", mode = 'x', desc = 'Format selection' },
},
opts = {
format_options = {
async = true,
lsp_fallback = true,
},
notify_on_error = true,
formatters_by_ft = {
blade = { "blade-formatter" },
lua = { "stylua" },
["_"] = { "prettier" }
}
}
}

View file

@ -0,0 +1,7 @@
return {
keys = {
["<leader>la"] = { ":Laravel artisan<cr>", "Run artisan" },
["<leader>lr"] = { ":Laravel routes<cr>", "Search routes" },
["<leader>lm"] = { ":Laravel related<cr>", "Related" },
},
}

View file

@ -0,0 +1,45 @@
local icons = require('config.icons')
return {
key_groups = {
["<leader>s"] = { name = "+search" },
},
keys = {
{ '<leader>sf', '<cmd>Telescope find_files<cr>', desc = 'Search files' },
{ '<leader>sa', '<cmd>Telescope live_grep<cr>', desc = 'Search in files' },
{ '<leader>sg', '<cmd>Telescope git_files<cr>', desc = 'Search Git files' },
{ '<leader>so', '<cmd>Telescope oldfiles<cr>', desc = 'Search Old files' },
{ '<leader>sw', '<cmd>Telescope grep_string<cr>', desc = 'Search for word under cursor' },
-- LSP
{ '<leader>sr', '<cmd>Telescope lsp_references<cr>', desc = 'Search Reference' },
{ '<leader>ss', '<cmd>Telescope lsp_document_symbols<cr>', desc = 'Search document symbols' },
{ '<leader>sr', '<cmd>Telescope lsp_references<cr>', desc = 'Search Reference' },
{ 'gd', '<cmd>Telescope lsp_definitions<cr>', desc = 'Goto definition' },
},
opts = function()
local actions = require("telescope.actions")
return {
defaults = {
path_display = { truncate = 1 },
prompt_prefix = ' ',
selection_caret = icons.current .. ' ',
multi_icon = icons.selected .. ' ',
file_ignore_patterns = {
".git/",
"node_modules/"
},
mappings = {
i = {
["<esc>"] = actions.close
}
}
},
pickers = {
find_files = {
hidden = true
}
}
}
end,
}