diff --git a/README.md b/README.md index a4b37564f4070642e54203f1e776c55ae7c25cc4..17ccb9b2f07db18c67b24c20932e645277f36c80 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Im besten Falle ist die Terminal Schriftart eine Nerd-Font Die Tastaturkürzel konnen in der `lua/codecraft/core/keymaps.lua` bearbeitet werden. -Um Farbschemen zu testen einfach `:Telescope colorschemes` und dann, das zu testende ausprobieren. Wenn du das richtige gefunden hast, in der `lua/codecraft/core/colorschemes` das richtige colorscheme aus dem `vim.cmd[[colorscheme xy]]` unkommentieren/hinzufügen. +Um Farbschemen zu testen einfach `:Telescope colorschemes` und dann, das zu testende ausprobieren. Wenn du das richtige gefunden hast, in der `lua/codecraft/core/colorschemes` das richtige colorscheme an Stelle des Aktiven Colorschemes einsetzen in `vim.cmd[[colorscheme <name>]]` TIPP: OneDark wird nur konfiguriert, nicht geladen. diff --git a/init.lua b/init.lua index a84fd32d7288da0ad8a76404ff946cdaf1123442..21004502e7c39ef57c50942d4df0c3cf5164b61a 100644 --- a/init.lua +++ b/init.lua @@ -11,6 +11,7 @@ require('codecraft.plugin-setup') -- core codecrafturation require('codecraft.core.options') require('codecraft.core.keymaps') +require('codecraft.core.colorschemeconfig') require('codecraft.core.colorscheme') -- plugin codecrafturation diff --git a/lua/codecraft/core/colorscheme.lua b/lua/codecraft/core/colorscheme.lua index 492dd821f2932e4d8f8f1542e3a3c55e4ef98ff6..3a67b17fa6b7be93685dbaba9fe77d3e2fdcb155 100644 --- a/lua/codecraft/core/colorscheme.lua +++ b/lua/codecraft/core/colorscheme.lua @@ -1,100 +1,15 @@ --- gruvbox --- vim.cmd[[colorscheme gruvbox]] +-- To test colorschemes `:Telescope colorschemes` or `:colorscheme <name>` +-- Colorscheme options: +-- gruvbox -- tokyonight --- vim.cmd[[colorscheme tokyonight]] --- vim.cmd[[colorscheme tokyonight-night]] --- vim.cmd[[colorscheme tokyonight-storm]] --- vim.cmd[[colorscheme tokyonight-day]] --- vim.cmd[[colorscheme tokyonight-moon]] +-- tokyonight-night +-- tokyonight-storm +-- tokyonight-day +-- tokyonight-moon +-- lunar --- LUNAR -vim.cmd[[colorscheme lunar]] +-- Configurable (in colorschemeconfig, activate here): +-- onedark +-- catppuccin --- ONEDARK --- Set colorscheme --- config -require('onedark').setup { - -- Main options -- - style = 'dark', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light' - transparent = true, -- Show/hide background - term_colors = false, -- Change terminal color as per the selected theme style - ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden - cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu - - -- toggle theme style --- - toggle_style_key = nil, -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "<leader>ts" - toggle_style_list = { 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer', 'light' }, -- List of styles to toggle between - - -- Change code style --- - -- Options are italic, bold, underline, none - -- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold' - code_style = { - comments = 'italic', - keywords = 'none', - functions = 'none', - strings = 'none', - variables = 'none' - }, - - -- Lualine options -- - lualine = { - transparent = true, -- lualine center bar transparency - }, - - -- Custom Highlights -- - colors = {}, -- Override default colors - highlights = {}, -- Override highlight groups - - -- Plugins Config -- - diagnostics = { - darker = true, -- darker colors for diagnostic - undercurl = true, -- use undercurl instead of underline for diagnostics - background = false, -- use background color for virtual text - }, -} - --- vim.cmd[[colorscheme onedark]] - -require("catppuccin").setup({ - flavour = "mocha", -- latte, frappe, macchiato, mocha - background = { -- :h background - light = "latte", - dark = "mocha", - }, - transparent_background = false, - show_end_of_buffer = false, -- show the '~' characters after the end of buffers - term_colors = false, - dim_inactive = { - enabled = false, - shade = "dark", - percentage = 0.15, - }, - no_italic = false, -- Force no italic - no_bold = false, -- Force no bold - styles = { - comments = { "italic" }, - conditionals = { "italic" }, - loops = {}, - functions = {}, - keywords = {}, - strings = {}, - variables = {}, - numbers = {}, - booleans = {}, - properties = {}, - types = {}, - operators = {}, - }, - color_overrides = {}, - custom_highlights = {}, - integrations = { - cmp = true, - gitsigns = true, - nvimtree = true, - telescope = true, - notify = false, - mini = false, - -- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations) - }, -}) --- vim.cmd[[colorscheme catppuccin]] +vim.cmd[[colorscheme catppuccin]] diff --git a/lua/codecraft/core/colorschemeconfig.lua b/lua/codecraft/core/colorschemeconfig.lua new file mode 100644 index 0000000000000000000000000000000000000000..ce3e265aba08e42798a2c41ed4a809400c3e2427 --- /dev/null +++ b/lua/codecraft/core/colorschemeconfig.lua @@ -0,0 +1,84 @@ +-- ONEDARK +require('onedark').setup { + -- Main options -- + style = 'dark', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light' + transparent = true, -- Show/hide background + term_colors = false, -- Change terminal color as per the selected theme style + ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden + cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu + + -- toggle theme style --- + toggle_style_key = nil, -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "<leader>ts" + toggle_style_list = { 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer', 'light' }, -- List of styles to toggle between + + -- Change code style --- + -- Options are italic, bold, underline, none + -- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold' + code_style = { + comments = 'italic', + keywords = 'none', + functions = 'none', + strings = 'none', + variables = 'none' + }, + + -- Lualine options -- + lualine = { + transparent = true, -- lualine center bar transparency + }, + + -- Custom Highlights -- + colors = {}, -- Override default colors + highlights = {}, -- Override highlight groups + + -- Plugins Config -- + diagnostics = { + darker = true, -- darker colors for diagnostic + undercurl = true, -- use undercurl instead of underline for diagnostics + background = false, -- use background color for virtual text + }, +} + +-- CATPUCCIN +require("catppuccin").setup({ + flavour = "mocha", -- latte, frappe, macchiato, mocha + background = { -- :h background + light = "latte", + dark = "mocha", + }, + transparent_background = true, + show_end_of_buffer = false, -- show the '~' characters after the end of buffers + term_colors = false, + dim_inactive = { + enabled = false, + shade = "dark", + percentage = 0.15, + }, + no_italic = false, -- Force no italic + no_bold = false, -- Force no bold + styles = { + comments = { "italic" }, + conditionals = { "italic" }, + loops = {}, + functions = {}, + keywords = {}, + strings = {}, + variables = {}, + numbers = {}, + booleans = {}, + properties = {}, + types = {}, + operators = {}, + }, + color_overrides = {}, + custom_highlights = {}, + integrations = { + cmp = true, + gitsigns = true, + nvimtree = true, + telescope = true, + notify = false, + mini = false, + -- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations) + }, +}) diff --git a/lua/codecraft/plugin/lsp/null-ls.lua b/lua/codecraft/plugin/lsp/null-ls.lua index 2935bbef306532efa14bbbdb4aca98820848a5d1..799ee1892ec2576f6643234d5acc9657425c06c5 100644 --- a/lua/codecraft/plugin/lsp/null-ls.lua +++ b/lua/codecraft/plugin/lsp/null-ls.lua @@ -8,6 +8,7 @@ local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) local formatters_linters = { prettier = {}, + erb_lint = {} } mason_null_ls.setup({ @@ -16,6 +17,7 @@ mason_null_ls.setup({ null_ls.setup ({ sources = { formatting.prettier, + diagnostics.erb_lint }, on_attach = function(current_client, bufnr) if current_client.supports_method("textDocument/formatting") then