aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2024-08-23 09:40:05 -0300
committerElvis Claros Castro <elvis@claros.ar>2024-08-23 09:40:05 -0300
commit969aa6d3444f857c383b0e271febe087cd224349 (patch)
tree626929d795c5e4c262afb00570a87f3df0212fc3
parent59ab00e081d92db8760d65f3146f4156a962d5e4 (diff)
downloadnvim-conf-969aa6d3444f857c383b0e271febe087cd224349.tar.gz
nvim-conf-969aa6d3444f857c383b0e271febe087cd224349.zip
Feat: update
-rw-r--r--lazy-lock.json19
-rw-r--r--lua/pi/animations.lua2
-rw-r--r--lua/pi/dap/configs/cpp.lua33
-rw-r--r--lua/pi/lsp/default.lua5
-rw-r--r--lua/pi/lsp/init.lua2
-rw-r--r--lua/pi/lsp/null-ls.lua1
-rw-r--r--lua/pi/lsp/servers/clangd.lua21
-rw-r--r--lua/pi/lsp/servers/smarty_ls.lua (renamed from lua/pi/lsp/servers/vscode_smarty_langserver.lua)0
-rw-r--r--lua/plugins/colorize.lua20
-rw-r--r--lua/plugins/colorscheme.lua115
-rw-r--r--lua/plugins/lualine.lua317
-rw-r--r--lua/plugins/oil.lua15
-rw-r--r--lua/plugins/rustaceanvim.lua2
13 files changed, 391 insertions, 161 deletions
diff --git a/lazy-lock.json b/lazy-lock.json
index 0d8b6d0..3992226 100644
--- a/lazy-lock.json
+++ b/lazy-lock.json
@@ -1,7 +1,7 @@
{
"CodeGPT.nvim": { "branch": "master", "commit": "6333509027c8dd66b646e0f70c0ea6b2c283abae" },
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
- "CopilotChat.nvim": { "branch": "canary", "commit": "1a92bb6d69b35bbfe32a57f81dc4f254abb56352" },
+ "CopilotChat.nvim": { "branch": "canary", "commit": "43d033b68c8bede4cc87092c7db6bb3bbb2fe145" },
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"LuaSnip": { "branch": "master", "commit": "500981ff6cefc7343e3959ef0f939bd0bfd49ba9" },
"NeoColumn.nvim": { "branch": "main", "commit": "db7695c7c70fcacd290712deef659bca464634ee" },
@@ -9,7 +9,6 @@
"animation.nvim": { "branch": "main", "commit": "fb77091ab72ec9971aee0562e7081182527aaa6a" },
"baleia.nvim": { "branch": "main", "commit": "1b25eac3ac03659c3d3af75c7455e179e5f197f7" },
"buffer_manager.nvim": { "branch": "main", "commit": "fd36131b2b3e0f03fd6353ae2ffc88cf920b3bbb" },
- "catppuccin": { "branch": "main", "commit": "4fd72a9ab64b393c2c22b168508fd244877fec96" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" },
@@ -30,7 +29,7 @@
"elixir-tools.nvim": { "branch": "main", "commit": "5e7596be469be0800e9cbe3415de971f7286c3d0" },
"firenvim": { "branch": "master", "commit": "bb70728c13c305ff35193586d5f6ce68668af063" },
"flutter-tools.nvim": { "branch": "main", "commit": "de817aaf2f1553db3da3650b196e8936b04e7f14" },
- "fzf": { "branch": "master", "commit": "8cb59e6fcac3dce8dfa44b678fdc94cf81efa11b" },
+ "fzf": { "branch": "master", "commit": "cf2242aea30bf709282fb3c6ff8867c0593c3664" },
"fzf.vim": { "branch": "master", "commit": "6f28c8c7bb551161a0315a76488522204f39c1f4" },
"git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" },
"gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" },
@@ -44,7 +43,6 @@
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
"lspkind-nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" },
"lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" },
- "lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
"luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" },
"markdown-preview.nvim": { "branch": "main", "commit": "cc05a30393e2bf9f12e2d59fc35a1aa928ed1727" },
@@ -53,9 +51,9 @@
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" },
"mini.icons": { "branch": "main", "commit": "12e7b5d47bfc1b4c5ba4278fb49ec9100138df14" },
- "mini.nvim": { "branch": "main", "commit": "71b5694a2df4f7e3661855eb8e2814980d2e0ac9" },
+ "mini.nvim": { "branch": "main", "commit": "a8185957febe7dae31556dbd7326cfa597b812f1" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
- "neogen": { "branch": "main", "commit": "2cad4d6fe9fb7d359ef60f169cf4dad8eb17d6c5" },
+ "neogen": { "branch": "main", "commit": "e932ba918b56723436b77aa3efb844a11b2851ab" },
"neorg": { "branch": "main", "commit": "85f15f033d8c56366ac1e6ae93c940db8ad067ca" },
"neotest": { "branch": "master", "commit": "32ff2ac21135a372a42b38ae131e531e64833bd3" },
"neotest-go": { "branch": "main", "commit": "92950ad7be2ca02a41abca5c6600ff6ffaf5b5d6" },
@@ -66,7 +64,7 @@
"none-ls-extras.nvim": { "branch": "main", "commit": "dfdc998a8c7bb728abab156942bd43ed2345845a" },
"none-ls-luacheck.nvim": { "branch": "main", "commit": "a1dfea0d4c40c4023829c8b9a7ab0a26135985ca" },
"none-ls-shellcheck.nvim": { "branch": "main", "commit": "0f84461241e76e376a95fb7391deac82dc3efdbf" },
- "none-ls.nvim": { "branch": "main", "commit": "cfa65d86e21eeb60544d5e823f6db43941322a53" },
+ "none-ls.nvim": { "branch": "main", "commit": "cb5bd2ffd81b7a3d264deebfe894388010381dc5" },
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
"numb.nvim": { "branch": "master", "commit": "3f7d4a74bd456e747a1278ea1672b26116e0824d" },
"nvim-autopairs": { "branch": "master", "commit": "19606af7c039271d5aa96bceff101e7523af3136" },
@@ -79,13 +77,13 @@
"nvim-dap-virtual-text": { "branch": "master", "commit": "484995d573c0f0563f6a66ebdd6c67b649489615" },
"nvim-dap-vscode-js": { "branch": "main", "commit": "03bd29672d7fab5e515fc8469b7d07cc5994bbf6" },
"nvim-html-css": { "branch": "main", "commit": "c514bd27ad560636ed39dea3e370b3103754e244" },
- "nvim-lspconfig": { "branch": "master", "commit": "b21c166bbf337734f2a39734a905c1c3e298205c" },
+ "nvim-lspconfig": { "branch": "master", "commit": "a7f0f9c18baa70a3970ea18f9984e03b6f6c2e8a" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
"nvim-python-repl": { "branch": "main", "commit": "3d63e4f298233cb97e0fb2d8360857120235112f" },
"nvim-spectre": { "branch": "master", "commit": "ba7fb777edff6c1fbbeffd343e113af64c04e90a" },
"nvim-transparent": { "branch": "main", "commit": "2c78d94448b534c35ca1d88a3bae90b1cd1a3d4d" },
- "nvim-treesitter": { "branch": "master", "commit": "0b8b78f9d08dc338a146eb4cd4bcbed8dd36a783" },
+ "nvim-treesitter": { "branch": "master", "commit": "8724e7d028ba11604dde94dc4be63f70cccf16e0" },
"nvim-treesitter-context": { "branch": "master", "commit": "0f3332788e0bd37716fbd25f39120dcfd557c90f" },
"nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "41e3abf6bfd9a9a681eb1f788bdeba91c9004b2b" },
@@ -99,8 +97,9 @@
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"refactoring.nvim": { "branch": "master", "commit": "c406fc5fb4d7ba5fce7b668637075fad6e75e9f8" },
- "rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" },
+ "rustaceanvim": { "branch": "master", "commit": "7cba8e599deca98d4b44cac1bcbd720c62937d90" },
"smart-splits.nvim": { "branch": "master", "commit": "b518cfb5283a2da43fa9935e850ba9d77873453d" },
+ "solarized-osaka.nvim": { "branch": "main", "commit": "126d394c0c979a99206214a2b6b8c86e456c9c0f" },
"telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "a46780830b576049c675680650f773bedfa8677a" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
diff --git a/lua/pi/animations.lua b/lua/pi/animations.lua
index c0b7a6c..3ff711f 100644
--- a/lua/pi/animations.lua
+++ b/lua/pi/animations.lua
@@ -1,6 +1,6 @@
local redraw_buffer = function()
local Animation = require "animation"
- local fps = 45 -- frames per second
+ local fps = 15 -- frames per second
local easing = require "animation.easing"
local buffer = 0
diff --git a/lua/pi/dap/configs/cpp.lua b/lua/pi/dap/configs/cpp.lua
new file mode 100644
index 0000000..d51d6bd
--- /dev/null
+++ b/lua/pi/dap/configs/cpp.lua
@@ -0,0 +1,33 @@
+local dap = require("dap")
+
+dap.adapters.cppdbg = {
+ id = 'cppdbg',
+ type = 'executable',
+ command = '~/.local/share/nvim/mason/packages/cpptools/extension/debugAdapters/bin/OpenDebugAD7',
+}
+
+dap.configurations.cpp = {
+ {
+ name = "Launch file",
+ type = "cppdbg",
+ request = "launch",
+ program = function()
+ return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
+ end,
+ cwd = '${workspaceFolder}',
+ stopAtEntry = true,
+ },
+ {
+ name = 'Attach to gdbserver :1234',
+ type = 'cppdbg',
+ request = 'launch',
+ MIMode = 'gdb',
+ miDebuggerServerAddress = 'localhost:1234',
+ miDebuggerPath = '/usr/bin/gdb',
+ cwd = '${workspaceFolder}',
+ program = function()
+ return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
+ end,
+ },
+}
+dap.configurations.c = dap.configurations.cpp
diff --git a/lua/pi/lsp/default.lua b/lua/pi/lsp/default.lua
index e2517f0..8a47cbf 100644
--- a/lua/pi/lsp/default.lua
+++ b/lua/pi/lsp/default.lua
@@ -28,6 +28,11 @@ return {
filetypes = {"smarty"},
root_dir = require("lspconfig.util").root_pattern("composer.json", ".git"),
},
+ clangd = {
+ enable = true,
+ filetypes = {"c", "cpp", "objc", "objcpp", "cuda", "proto" },
+ root_dir = require("lspconfig.util").root_pattern("compile_commands.json", ".git"),
+ },
},
default_options = function (options)
return vim.tbl_deep_extend("force", {
diff --git a/lua/pi/lsp/init.lua b/lua/pi/lsp/init.lua
index 17d73a1..64d09b7 100644
--- a/lua/pi/lsp/init.lua
+++ b/lua/pi/lsp/init.lua
@@ -3,7 +3,7 @@ return {
ops = vim.tbl_deep_extend("force", require "pi.lsp.default", ops)
local lspconfig = require "lspconfig"
-
+ require('lspconfig.ui.windows').default_options.border = 'single'
local mason_servers = {}
for server, options in pairs(ops.servers) do
if options.enable == true then
diff --git a/lua/pi/lsp/null-ls.lua b/lua/pi/lsp/null-ls.lua
index b105018..70693d9 100644
--- a/lua/pi/lsp/null-ls.lua
+++ b/lua/pi/lsp/null-ls.lua
@@ -38,6 +38,7 @@ null_ls.setup {
end,
},
null_ls.builtins.formatting.pint,
+ null_ls.builtins.formatting.clang_format,
},
}
diff --git a/lua/pi/lsp/servers/clangd.lua b/lua/pi/lsp/servers/clangd.lua
new file mode 100644
index 0000000..87633cd
--- /dev/null
+++ b/lua/pi/lsp/servers/clangd.lua
@@ -0,0 +1,21 @@
+local lsp_attach = require "pi.lsp.attach"
+local lsp_flags = require "pi.lsp.flags"
+
+return function(ops)
+ local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
+ local config = {
+ on_attach = lsp_attach,
+ flags = lsp_flags,
+ capabilities = vim.tbl_deep_extend("force", capabilities, {
+ offsetEncoding = { "utf-16" },
+ general = {
+ positionEncodings = { "utf-16" },
+ },
+ }),
+ }
+ if vim.fn.executable "clangd" == 1 then
+ config.cmd = { "clangd" }
+ end
+
+ return vim.tbl_extend("force", config, ops)
+end
diff --git a/lua/pi/lsp/servers/vscode_smarty_langserver.lua b/lua/pi/lsp/servers/smarty_ls.lua
index bf29082..bf29082 100644
--- a/lua/pi/lsp/servers/vscode_smarty_langserver.lua
+++ b/lua/pi/lsp/servers/smarty_ls.lua
diff --git a/lua/plugins/colorize.lua b/lua/plugins/colorize.lua
index 89d4039..41a4006 100644
--- a/lua/plugins/colorize.lua
+++ b/lua/plugins/colorize.lua
@@ -1,5 +1,19 @@
return {
- "norcalli/nvim-colorizer.lua",
- event = "VeryLazy",
- config = true,
+ 'norcalli/nvim-colorizer.lua',
+ config = function()
+ require('colorizer').setup({
+ 'css',
+ 'lua',
+ }, {
+ RGB = true, -- Colorear valores RGB
+ RRGGBB = true, -- Deshabilitar otros formatos
+ names = false, -- Deshabilitar nombres de colores como "Red"
+ RRGGBBAA = true, -- Deshabilitar valores RGBA
+ rgb_fn = true, -- Deshabilitar funciones rgb() y rgba()
+ hsl_fn = true, -- Deshabilitar funciones hsl() y hsla()
+ css = false, -- Deshabilitar otros valores CSS
+ css_fn = false, -- Deshabilitar funciones CSS
+ })
+ end
}
+
diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua
index b72b76f..376feee 100644
--- a/lua/plugins/colorscheme.lua
+++ b/lua/plugins/colorscheme.lua
@@ -1,40 +1,81 @@
return {
- {
- 'catppuccin/nvim',
- name = 'catppuccin',
- lazy = false,
- priority = 1000,
- opts = {
- flavour = 'frappe',
- transparent_background = true,
- integrations = {
- mason = true,
- mini = true,
- native_lsp = {
- underlines = {
- errors = { 'undercurl' },
- hints = { 'undercurl' },
- warnings = { 'undercurl' },
- information = { 'undercurl' },
- },
- },
- treesitter_context = true,
- which_key = true,
+ "craftzdog/solarized-osaka.nvim",
+ lazy = false,
+ priority = 1000,
+ opts = {},
+ config = function()
+
+ -- Colorscheme Solarized Osaka by Takuya Matsuyama (https://github.com/craftzdog/solarized-osaka.nvim)
+ require("solarized-osaka").setup({
+ -- your configuration comes here
+ -- or leave it empty to use the default settings
+ transparent = true, -- Enable this to disable setting the background color
+ terminal_colors = true, -- Configure the colors used when opening a `:terminal` in [Neovim](https://github.com/neovim/neovim)
+ styles = {
+ -- Style to be applied to different syntax groups
+ -- Value is any valid attr-list value for `:help nvim_set_hl`
+ comments = { italic = true },
+ keywords = { italic = true },
+ functions = { italic = true },
+ variables = { bold = true},
+ -- Background styles. Can be "dark", "transparent" or "normal"
+ sidebars = "dark", -- style for sidebars, see below
+ floats = "dark", -- style for floating windows
},
- },
- config = function(_, opts)
- require('catppuccin').setup(opts)
- vim.cmd.colorscheme 'catppuccin'
- end,
- },
- {
- 'stevearc/dressing.nvim',
- event = 'VeryLazy',
- opts = {
- input = {
- insert_only = false,
- start_in_insert = false,
- },
- },
- },
+ sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]`
+ day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors
+ hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**.
+ dim_inactive = false, -- dims inactive windows
+ lualine_bold = true, -- When `true`, section headers in the lualine theme will be bold
+
+ --- You can override specific color groups to use other groups or a hex color
+ --- function will be called with a ColorScheme table
+ ---@param colors ColorScheme
+ on_colors = function(colors) end,
+
+ --- You can override specific highlights to use other groups or a hex color
+ --- function will be called with a Highlights and ColorScheme table
+ ---@param highlights Highlights
+ ---@param colors ColorScheme
+ on_highlights = function(hl, c)
+ hl.IblIndent = { fg = c.base03, nocombine = true }
+ hl.IndentBlanklineChar = { fg = c.blue, nocombine = true }
+ hl.IndentBlanklineContextChar = { fg = c.orange500, nocombine = true }
+
+ local prompt = "#2d3149"
+ hl.TelescopeNormal = {
+ bg = c.bg_dark,
+ fg = c.fg_dark,
+ }
+ hl.TelescopeBorder = {
+ bg = c.bg_dark,
+ fg = c.bg_dark,
+ }
+ hl.TelescopePromptNormal = {
+ bg = prompt,
+ }
+ hl.TelescopePromptBorder = {
+ bg = prompt,
+ fg = prompt,
+ }
+ hl.TelescopePromptTitle = {
+ bg = prompt,
+ fg = prompt,
+ }
+ hl.TelescopePreviewTitle = {
+ bg = c.bg_dark,
+ fg = c.bg_dark,
+ }
+ hl.TelescopeResultsTitle = {
+ bg = c.bg_dark,
+ fg = c.bg_dark,
+ }
+ end,
+ })
+
+
+ -- setup must be called before loading
+ vim.cmd.colorscheme "solarized-osaka"
+
+ end
}
diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua
index b5a4b47..88a0fec 100644
--- a/lua/plugins/lualine.lua
+++ b/lua/plugins/lualine.lua
@@ -1,127 +1,232 @@
return {
- {
- 'nvim-lualine/lualine.nvim',
- dependencies = {
- 'kyazdani42/nvim-web-devicons',
- 'arkav/lualine-lsp-progress',
- },
- opts = function()
- local function winnr() return ' ' .. vim.fn.winnr() end
- local function bufnr() return '󱔗 ' .. vim.fn.bufnr() end
-
- local function lualine_c(filename_opts)
- filename_opts = filename_opts or {}
-
- return {
- {
- 'filetype',
- icon_only = true,
- separator = '',
- padding = { left = 1, right = 0 },
- },
- {
- 'filename',
- file_status = filename_opts.file_status,
- padding = 0,
- path = filename_opts.fullpath and 1,
- separator = '',
- },
- }
+ 'nvim-lualine/lualine.nvim',
+ dependencies = { 'nvim-tree/nvim-web-devicons' },
+ config = function()
+
+ local colors = require("solarized-osaka.colors").setup({ transform = true })
+ local config = require("solarized-osaka.config").options
+
+ local solarized_osaka = {
+ normal = {
+ a = { bg = colors.base03, fg = colors.blue100 },
+ b = { bg = colors.fg, fg = colors.black },
+ c = { bg = colors.bg_statusline, fg = colors.fg },
+ },
+ insert = {
+ a = { bg = colors.base03, fg = colors.green100 },
+ },
+
+ command = {
+ a = { bg = colors.base03, fg = colors.yellow100 },
+ },
+
+ visual = {
+ a = { bg = colors.base03, fg = colors.magenta100 },
+ },
+
+ replace = {
+ a = { bg = colors.base03, fg = colors.red100 },
+ },
+
+ terminal = {
+ a = { bg = colors.base03, fg = colors.orange100 },
+ },
+
+ inactive = {
+ a = { bg = colors.bg_statusline, fg = colors.blue },
+ b = { bg = colors.bg_statusline, fg = colors.fg, gui = "bold" },
+ c = { bg = colors.bg_statusline, fg = colors.fg },
+ }
+ }
+
+ for _, mode in pairs(solarized_osaka) do
+ if config.lualine_bold then
+ mode.a.gui = "bold"
end
+ end
- local sections = {
- lualine_a = { winnr },
- lualine_b = { bufnr },
- lualine_d = lualine_c { fullpath = true },
- lualine_x = { 'searchcount' },
- lualine_y = {
- "diagnostics",
- "diff",
+ -- local empty = require('lualine.component'):extend()
+
+ -- local function jarak()
+ -- return ' '
+ -- end
+
+ local empty = require('lualine.component'):extend()
+ function empty:draw(default_highlight)
+ self.status = ''
+ self.applied_separator = ''
+ self:apply_highlights(default_highlight)
+ self:apply_section_separators()
+ return self.status
+ end
+
+ local function process_sections(sections)
+ for name, section in pairs(sections) do
+ local left = name:sub(9, 10) < 'x'
+ for pos = 1, name ~= 'lualine_z' and #section or #section - 1 do
+ table.insert(section, pos * 2, { empty, color = { fg = colors.base03, bg = colors.base03 } })
+ end
+ for id, comp in ipairs(section) do
+ if type(comp) ~= 'table' then
+ comp = { comp }
+ section[id] = comp
+ end
+ -- comp.separator = left and { right = '' } or { left = '' }
+ comp.separator = left and { right = ' ' } or { left = ' '}
+ -- comp.separator = {left = '' } and { right = '' }
+ end
+ end
+ return sections
+ end
+
+ local lazy_status = require("lazy.status")
+
+ require('lualine').setup{
+ options =
+ {
+ theme = solarized_osaka,
+ -- icons_enabled = true,
+ -- component_separators = { left = '>', right = '┇' },
+ -- section_separators = {left = '', right = '' },
+ },
+ sections = process_sections {
+ lualine_a = {
+ { 'mode',
+ -- icons_enabled = true,
+ icon = {
+ " ",
+ color = { fg = colors.base4, bg = colors.base03, gui = 'bold'}
+ },
+ -- color = { fg = colors.base0, bg = colors.green300, gui = 'bold' },
+ -- separator = { left = '', right = '' },
+ -- left_padding = 2, right_padding = 0,
+ },
+ },
+ -- lualine_b = { 'filename', 'branch' },
+ lualine_b = {
{
- require("noice").api.status.mode.get,
- cond = require("noice").api.status.mode.has,
- color = { fg = "#ff9e64" },
+ 'branch',
+ -- separator = { left = '', right = '' },
+ -- left_padding = 0, right_padding = 2,
+ icon = {
+ "",
+ -- align = 'left',
+ color = { fg = colors.orange100, bg = colors.base03, gui = 'bold'},
+ -- -- separator = {left = '', right = ''}
+ },
+ -- left_padding = 0,
+ color = { fg = colors.orange100, bg = colors.base03, gui = 'bold' },
},
{
- require("lazy.status").updates,
- cond = require("lazy.status").has_updates,
- color = { fg = "ff9e64" },
+ 'diff',
+ -- separator = { right = '',left = ''},
+ colored = true,
+ symbols = { added = " " , modified = " " , removed = " " },
+ diff_color = {
+ added = { fg = colors.green300, bg = colors.base03, gui = 'bold' },
+ modified = { fg = colors.yellow300, bg = colors.base03, gui = 'bold' },
+ removed = { fg = colors.red300, bg = colors.base03, gui = 'bold' },
+ }
},
},
- lualine_z = { 'progress' },
- }
-
- return {
- options = {
- disabled_filetypes = { 'pi', 'dbui', 'fugitiveblame' },
- theme = 'catppuccin',
- },
- tabline = {
- lualine_a = {
- 'mode',
- 'selectioncount',
- function() return vim.fn.fnamemodify(vim.fn.getcwd(), ':p:~:h') end,
+ lualine_c = {
+ {
+ 'filename',
+ on_click = function()
+ require('telescope.builtin').find_files()
+ -- print('file name clicked')
+ end,
+ icon = ' ',
+ color = { fg = colors.yellow100, bg = colors.base03, gui = 'bold'},
+ path = 4,
+ file_status = false,
+ -- separator = { right = '┇', left = '┇'},
},
- lualine_b = {
- function()
- local dap_status = require('dap').status()
-
- return dap_status ~= '' and '󰃤 ' .. dap_status or ''
+ },
+ lualine_x = {
+ {
+ 'diagnostics',
+ on_click = function()
+ require('telescope.builtin').diagnostics()
end,
- },
- lualine_x = { 'lsp_progress' },
- lualine_y = { { "branch", icon = "" }, "db_ui#statusline" },
- lualine_z = {
- {
- 'tabs',
- show_modified_status = false,
- use_mode_colors = true,
+ -- separator = { left = '' },
+ sources = { 'nvim_diagnostic'},
+ sections = { 'error', 'warn', 'info', 'hint' },
+
+ diagnostics_color = {
+ error = { fg = colors.red300, bg = colors.base03 , gui = 'bold'}, -- Changes diagnostics' error color.
+ added = { fg = colors.green300, bg = colors.base03, gui = 'bold'},
+ warn = { fg = colors.yellow300, bg = colors.base03, gui = 'bold' }, -- Changes diagnostics' warn color.
+ info = { fg = colors.blue300, bg = colors.base03, gui = 'bold' }, -- Changes diagnostics' info color.
+ hint = { fg = colors.cyan300, bg = colors.base03, gui = 'bold' }, -- Changes diagnostics' hint color.
},
+ symbols = { error = " ", warn = " ", hint = "󰠠 ", info = " " },
+ colored = true, -- Displays diagnostics status in color if set to true.
+ update_in_insert = true, -- Update diagnostics in insert mode. default = false
+ always_visible = false, -- Show diagnostics even if there are none.
},
- },
- sections = sections,
- inactive_sections = sections,
- extensions = {
{
- filetypes = { 'fugitive', 'git' },
- sections = vim.tbl_extend('force', sections, {
- lualine_c = { { 'FugitiveHead', icon = '' } },
- }),
+ lazy_status.updates,
+ cond = lazy_status.has_updates,
+ color = {fg=colors.orange300},
},
{
- filetypes = { 'help', 'man' },
- sections = vim.tbl_extend('force', sections, {
- lualine_c = lualine_c { file_status = false },
- }),
+ -- code from https://github.com/nvim-lualine/lualine.nvim/blob/566b7036f717f3d676362742630518a47f132fff/examples/evil_lualine.lua
+ -- Lsp server name .
+ function()
+ local msg = 'No LSP'
+ local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
+ local clients = vim.lsp.get_clients()
+ if next(clients) == nil then
+ return msg
+ end
+ for _, client in ipairs(clients) do
+ local filetypes = client.config.filetypes
+ if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
+ return client.name
+ end
+ end
+ return msg
+ end,
+ -- icon = ' LSP:',
+ -- icon = {' ', color = {bg = colors.base03, fg = colors.red100}},
+ -- separator = { left = '', right = ''},
+ -- separator = { left = ' ', right = ' '},
+ color = { fg = colors.base4, gui = 'bold', bg = colors.base03 },
},
+
{
- filetypes = { 'oil' },
- sections = vim.tbl_extend('force', sections, {
- lualine_c = {
- {
- function()
- local dir = require('oil').get_current_dir()
-
- return dir and vim.fn.fnamemodify(dir, ':p:~:.')
- end,
- icon = {
- '',
- color = {
- fg = require('catppuccin.palettes').get_palette('frappe').maroon,
- },
- },
- },
- },
- }),
- },
+ 'filetype',
+ color = {bg = colors.base03, fg = colors.magenta100, gui = 'bold'}
+ -- separator = { left = '', right = ' ' },
+ }
+ },
+ lualine_y = {
{
- filetypes = { 'qf' },
- sections = vim.tbl_extend('force', sections, {
- lualine_c = { 'w:quickfix_title' },
- }),
+ 'progress', left_padding = 0,
+ color = {bg = colors.base03, fg = colors.cyan100, gui = 'bold'}
+ }
+ },
+ lualine_z = {
+ {
+ -- 'location',
+ -- function()
+ -- return "Ln:%l Col:%c"
+ -- end
+ -- separator = { right = '' }, left_padding = 2 },
+ }
},
},
+ inactive_sections = {
+ lualine_a = {},
+ lualine_b = {},
+ lualine_c = {'filename'},
+ lualine_x = {'location'},
+ lualine_y = {},
+ lualine_z = {},
+ },
+ tabline = {},
+ extensions = {},
}
- end,
- },
-}
+ end
+ }
diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua
index 947876e..694fea9 100644
--- a/lua/plugins/oil.lua
+++ b/lua/plugins/oil.lua
@@ -5,7 +5,7 @@ return
-- Optional dependencies
dependencies = {
"nvim-tree/nvim-web-devicons",
- "ElvisClaros/oil-image-preview.nvim",
+ {"ElvisClaros/oil-image-preview.nvim", lazy = false},
},
config = function ()
@@ -60,7 +60,7 @@ return
-- Set to `false` to disable, or "name" to keep it on the file names
constrain_cursor = "editable",
-- Set to true to watch the filesystem for changes and reload oil
- experimental_watch_for_changes = false,
+ experimental_watch_for_changes = true,
-- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
-- Additionally, if it is a string that matches "actions.<name>",
@@ -86,6 +86,17 @@ return
["g\\"] = "actions.toggle_trash",
["g<leader>"] = oip.openWithQuickLook,
["gp"] = oip.weztermPreview,
+ ["gdi"] = function()
+ require("oil").set_columns({ "icon", "", "", "" })
+ end,
+ ["gdf"] = function()
+ require("oil").set_columns({ "icon", "permissions", "size", "mtime" })
+ end,
+ ["g:"] = {
+ "actions.open_terminal",
+ desc = "Open terminal in current directory",
+ },
+
},
-- Configuration for the floating keymaps help window
keymaps_help = {
diff --git a/lua/plugins/rustaceanvim.lua b/lua/plugins/rustaceanvim.lua
index 766d52d..46c4c82 100644
--- a/lua/plugins/rustaceanvim.lua
+++ b/lua/plugins/rustaceanvim.lua
@@ -1,5 +1,5 @@
return {
'mrcjkb/rustaceanvim',
- version = '^4', -- Recommended
+ version = '^5', -- Recommended
lazy = false, -- This plugin is already lazy
}