From e07d6b2aab3ea66e558e4ea224f1ad17b8e4d843 Mon Sep 17 00:00:00 2001 From: Bryan Ramos Date: Sun, 29 Dec 2024 17:27:15 -0500 Subject: [PATCH] changes --- src/user/modules/git/default.nix | 6 +- .../gui/wm/hyprland/config/waybar/config | 2 +- .../config/nvim/lua/plugins/colorscheme.lua | 8 ++ .../config/nvim/lua/plugins/disabled.lua | 2 - .../neovim/config/nvim/lua/plugins/lsp.lua | 99 ++++++++++--------- 5 files changed, 67 insertions(+), 50 deletions(-) diff --git a/src/user/modules/git/default.nix b/src/user/modules/git/default.nix index cb02bbd..b3bc4d4 100644 --- a/src/user/modules/git/default.nix +++ b/src/user/modules/git/default.nix @@ -19,8 +19,12 @@ in vimdiff = { trustExitCode = true; }; + keepBackup = false; + }; + merge = { + tool = "vimdiff"; + }; - merge = { tool = "vimdiff"; }; safe = { directory = [ "/etc/nixos" diff --git a/src/user/modules/gui/wm/hyprland/config/waybar/config b/src/user/modules/gui/wm/hyprland/config/waybar/config index 296ab71..407eac0 100644 --- a/src/user/modules/gui/wm/hyprland/config/waybar/config +++ b/src/user/modules/gui/wm/hyprland/config/waybar/config @@ -2,7 +2,7 @@ "layer": "top", "position": "top", "output": "HDMI-A-1", - "modules-left": [ "custom/logo", "clock", "custom/weather", "custom/blockheight", "custom/price", "memory", "cpu" ], + "modules-left": [ "custom/logo", "clock", "custom/blockheight", "custom/price", "memory", "cpu" ], "modules-center": [ "hyprland/workspaces" ], "modules-right": [ "tray", "pulseaudio", "network" ], "reload_style_on_change":true, diff --git a/src/user/modules/utils/modules/neovim/config/nvim/lua/plugins/colorscheme.lua b/src/user/modules/utils/modules/neovim/config/nvim/lua/plugins/colorscheme.lua index e1224a1..7b5a011 100644 --- a/src/user/modules/utils/modules/neovim/config/nvim/lua/plugins/colorscheme.lua +++ b/src/user/modules/utils/modules/neovim/config/nvim/lua/plugins/colorscheme.lua @@ -29,6 +29,14 @@ return { hi LazyH1 ctermbg=Green ctermfg=Black guibg=Black guifg=Green hi IblScope guibg=NONE guifg=Yellow ctermbg=NONE ctermfg=Yellow + + hi ConflictMarker ctermfg=red guifg=red + match ConflictMarker /<<<<<<< HEAD\|=======\|>>>>>>> .\+/ + + hi DiffAdd ctermbg=none guibg=none + hi DiffChange ctermbg=none guibg=none + hi DiffDelete ctermbg=none guibg=none + hi DiffText ctermbg=none guibg=none ]]) vim.api.nvim_create_autocmd("TextYankPost", { diff --git a/src/user/modules/utils/modules/neovim/config/nvim/lua/plugins/disabled.lua b/src/user/modules/utils/modules/neovim/config/nvim/lua/plugins/disabled.lua index cd3b799..64e75ec 100644 --- a/src/user/modules/utils/modules/neovim/config/nvim/lua/plugins/disabled.lua +++ b/src/user/modules/utils/modules/neovim/config/nvim/lua/plugins/disabled.lua @@ -2,6 +2,4 @@ return { { "williamboman/mason.nvim", enabled = false }, { "williamboman/mason-lspconfig.nvim", enabled = false }, { "jay-babu/mason-nvim-dap.nvim", enabled = false }, - { "catppuccin/nvim", enabled = false }, - { "folke/flash.nvim", enabled = false }, } diff --git a/src/user/modules/utils/modules/neovim/config/nvim/lua/plugins/lsp.lua b/src/user/modules/utils/modules/neovim/config/nvim/lua/plugins/lsp.lua index c007a15..30ade8e 100644 --- a/src/user/modules/utils/modules/neovim/config/nvim/lua/plugins/lsp.lua +++ b/src/user/modules/utils/modules/neovim/config/nvim/lua/plugins/lsp.lua @@ -1,14 +1,14 @@ -- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md local servers = { - "ts_ls", - "pyright", - "nil_ls", - "cssls", - "html", - "lua_ls", - "marksman", - "tailwindcss", - "bashls", + "ts_ls", + "pyright", + "nil_ls", + "cssls", + "html", + "lua_ls", + "marksman", + "tailwindcss", + "bashls", "clangd", "jsonls", "vuels", @@ -21,7 +21,7 @@ return { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", config = function() - require('nvim-treesitter.configs').setup ({ + require('nvim-treesitter.configs').setup({ ensure_installed = { "lua", "c", @@ -54,46 +54,46 @@ return { { "m4xshen/autoclose.nvim", - config = function () + config = function() require("autoclose").setup() end }, - --{ - -- "nvim-treesitter/nvim-treesitter-context", + --{ + -- "nvim-treesitter/nvim-treesitter-context", -- dependencies = { "nvim-treesitter/nvim-treesitter" }, - -- config = function() - -- require("treesitter-context").setup({ - -- enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) - -- max_lines = 3, -- How many lines the window should span. Values <= 0 mean no limit. - -- min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. - -- line_numbers = false, - -- multiline_threshold = 20, -- Maximum number of lines to collapse for a single context line - -- trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' - -- mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline' - -- -- Separator between context and content. Should be a single character string, like '-'. - -- -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. - -- separator = "=", - -- zindex = 20, -- The Z-index of the context window - -- on_attach = nil, -- (fun(buf: integer): boolean) rurn false to disable attaching - -- }) - -- end, - --}, + -- config = function() + -- require("treesitter-context").setup({ + -- enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) + -- max_lines = 3, -- How many lines the window should span. Values <= 0 mean no limit. + -- min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. + -- line_numbers = false, + -- multiline_threshold = 20, -- Maximum number of lines to collapse for a single context line + -- trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' + -- mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline' + -- -- Separator between context and content. Should be a single character string, like '-'. + -- -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. + -- separator = "x", + -- zindex = 20, -- The Z-index of the context window + -- on_attach = nil, -- (fun(buf: integer): boolean) rurn false to disable attaching + -- }) + -- end, + --}, - { - "VonHeikemen/lsp-zero.nvim", - branch = "v2.x", - dependencies = { - { "neovim/nvim-lspconfig" }, + { + "VonHeikemen/lsp-zero.nvim", + branch = "v2.x", + dependencies = { + { "neovim/nvim-lspconfig" }, - { "hrsh7th/nvim-cmp" }, - { "hrsh7th/cmp-buffer" }, - { "hrsh7th/cmp-path" }, - { "hrsh7th/cmp-nvim-lsp" }, + { "hrsh7th/nvim-cmp" }, + { "hrsh7th/cmp-buffer" }, + { "hrsh7th/cmp-path" }, + { "hrsh7th/cmp-nvim-lsp" }, - { "L3MON4D3/LuaSnip" }, - }, - config = function () + { "L3MON4D3/LuaSnip" }, + }, + config = function() local lsp = require('lsp-zero').preset({}) lsp.setup_servers(servers) lsp.setup() @@ -127,7 +127,6 @@ return { snippet = { expand = function(args) require('luasnip').lsp_expand(args.body) - end }, @@ -162,15 +161,17 @@ return { for _, server in ipairs(servers) do lsp[server].setup { + -- Prevent LSP from autostarting + autostart = false, capabilities = capabilities, on_attach = function(client, bufnr) if client.server_capabilities.documentSymbolProvider then - navic.attach(client,bufnr) + navic.attach(client, bufnr) end end, } end - lsp.lua_ls.setup{ + lsp.lua_ls.setup { settings = { Lua = { diagnostics = { @@ -180,7 +181,13 @@ return { } } require("which-key").add({ - { "cl", ":LspInfo", desc = "LSP Info" }, + { "cs", group = "LSP Commands" }, + { "cf", ":LspFormat", desc = "Code Format" }, + { "csi", ":LspInfo", desc = "LSP Info" }, + { "csl", ":LspLog", desc = "LSP Log" }, + { "csr", ":LspRestart", desc = "LSP Restart" }, + { "css", ":LspStart", desc = "LSP Start" }, + { "csx", ":LspStop", desc = "LSP Stop" }, }) end },