ソースを参照

add terminal opacity windowrule + cmake integration + use clang for formatting/linting in c/c++

Noah Vogt 1 日 前
コミット
baabe8c533

+ 10 - 1
dot-config/hypr/hyprland.conf

@@ -60,7 +60,7 @@ general {
     gaps_in = 5
     gaps_out = 20
 
-    border_size = 2
+    border_size = 3
 
     # https://wiki.hypr.land/Configuring/Variables/#variable-types for info about colors
     col.active_border = rgba(33ccffee)
@@ -348,3 +348,12 @@ windowrule {
     move = 20 monitor_h-120
     float = yes
 }
+
+windowrule {
+    name = browser-opacity
+
+    match:class = ^(chromium|brave-browser)$
+
+    opacity = 1.0 override 1.0 override
+    opaque = true
+}

+ 1 - 0
dot-config/nvim/lazy-lock.json

@@ -1,6 +1,7 @@
 {
   "LuaSnip": { "branch": "master", "commit": "dae4f5aaa3574bd0c2b9dd20fb9542a02c10471c" },
   "blink.cmp": { "branch": "main", "commit": "612f4bd2bc29d9e7dc7be1dde960908951bedad1" },
+  "cmake-tools.nvim": { "branch": "master", "commit": "5fc40e9e252a113be945019ab16301b851eb98d1" },
   "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
   "ctrlp.vim": { "branch": "master", "commit": "86872f021c4e245e3c583054fda82fb820a2faee" },
   "emmet-vim": { "branch": "master", "commit": "cc8b1a9f2241e087330195c76651c5f9d9519e2f" },

+ 5 - 14
dot-config/nvim/lua/lsp.lua

@@ -3,7 +3,7 @@ local lspconfig = require('lspconfig')
 
 -- 1. Setup blink.cmp
 blink.setup({
-  keymap = { 
+  keymap = {
     preset = 'default',
     ['<CR>'] = { 'accept', 'fallback' },
     ['<Tab>'] = { 'select_next', 'fallback' },
@@ -36,7 +36,7 @@ end
 local capabilities = blink.get_lsp_capabilities()
 
 -- Basic servers
-local servers = { 'pyright', 'ruff', 'bashls', 'html', 'cssls', 'jdtls', 'rust_analyzer' }
+local servers = { 'pyright', 'ruff', 'bashls', 'html', 'cssls', 'jdtls', 'rust_analyzer', 'clangd' }
 for _, server in ipairs(servers) do
   vim.lsp.config(server, {
     capabilities = capabilities,
@@ -54,18 +54,6 @@ vim.lsp.config('veridian', {
 })
 vim.lsp.enable('veridian')
 
--- Custom CCLS setup (C/C++)
-vim.lsp.config('ccls', {
-  init_options = {
-    cache = { directory = "/tmp/ccls-cache" },
-    client = { snippetSupport = true }
-  },
-  root_patterns = { ".ccls-root", "compile_commands.json", ".git" },
-  capabilities = capabilities,
-  on_attach = on_attach,
-})
-vim.lsp.enable('ccls')
-
 -- 4. Formatting (Replaces coc's formatOnSave)
 local conform = require("conform")
 conform.setup({
@@ -74,6 +62,9 @@ conform.setup({
     java = { "google-java-format" },
     sh = { "shfmt" },
     rust = { "rustfmt" },
+    c = { "clang-format" },
+    cpp = { "clang-format" },
+    cmake = { "cmake_format" },
   },
   format_on_save = {
     timeout_ms = 2000,

+ 14 - 7
dot-config/nvim/lua/plugins.lua

@@ -25,6 +25,13 @@ require("lazy").setup({
     dependencies = { 'nvim-tree/nvim-web-devicons' },
   },
 
+  -- CMake Tools
+  {
+    'Civitasv/cmake-tools.nvim',
+    lazy = true,
+    cmd = { "CMakeGenerate", "CMakeBuild", "CMakeRun", "CMakeDebugTarget" },
+  },
+
   -- Airline
   'vim-airline/vim-airline',
   'vim-airline/vim-airline-themes',
@@ -57,10 +64,10 @@ require("lazy").setup({
   'tpope/vim-surround',
 
   -- Treesitter
-  { 
-    'nvim-treesitter/nvim-treesitter', 
-    branch = 'main', 
-    build = ':TSUpdate' 
+  {
+    'nvim-treesitter/nvim-treesitter',
+    branch = 'main',
+    build = ':TSUpdate'
   },
 
   -- Indentation
@@ -73,9 +80,9 @@ require("lazy").setup({
   },
 
   -- Wilder
-  { 
-    'gelguy/wilder.nvim', 
-    build = ':UpdateRemotePlugins' 
+  {
+    'gelguy/wilder.nvim',
+    build = ':UpdateRemotePlugins'
   },
 
   -- Markdown Preview