From 69f23e1384381e538c869955bdef7b6cfe2b3477 Mon Sep 17 00:00:00 2001 From: shadow cat Date: Sat, 13 Jul 2024 16:32:23 -0400 Subject: [PATCH] idk --- lua/config/filetype.lua | 1 + lua/config/settings.lua | 28 +++++++++++++++++++++------- lua/plugins/dev.lua | 28 +++++++++++----------------- lua/plugins/lspconfig.lua | 4 +++- lua/plugins/telescope.lua | 1 - lua/plugins/util.lua | 37 ++++++++++++++++++------------------- lua/plugins/visual.lua | 11 +++++------ 7 files changed, 59 insertions(+), 51 deletions(-) diff --git a/lua/config/filetype.lua b/lua/config/filetype.lua index bfeb9c3..398fba1 100644 --- a/lua/config/filetype.lua +++ b/lua/config/filetype.lua @@ -1,5 +1,6 @@ vim.filetype.add({ extension = { wgsl = 'wgsl', + slint = 'slint', }, }) diff --git a/lua/config/settings.lua b/lua/config/settings.lua index 8d87121..28ca481 100644 --- a/lua/config/settings.lua +++ b/lua/config/settings.lua @@ -5,6 +5,7 @@ local g = vim.g o.number = true o.showmode = false o.clipboard = "unnamedplus" +o.undofile = true g.mapleader = " " g.maplocalleader = "," @@ -33,17 +34,30 @@ else end -- diagnostics -local signs = { Error = " ", Warn = " ", Hint = "", Info = " " } -for type, icon in pairs(signs) do - local hl = "DiagnosticSign" .. type - vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) -end - +local sev = vim.diagnostic.severity +local text = { + [sev.ERROR] = " ", + [sev.WARN] = " ", + [sev.HINT] = "", + [sev.INFO] = " ", +} +local hl = { + [sev.ERROR] = "DiagnosticSignError", + [sev.WARN] = "DiagnosticSignWarn", + [sev.HINT] = "DiagnosticSignHint", + [sev.INFO] = "DiagnosticSignInfo", +} vim.diagnostic.config({ virtual_text = { prefix = "●" }, + signs = { + text = text, + numhl = hl, + }, }) -- neovide if vim.g.neovide then - + vim.g.transparency = 0.8 + vim.g.neovide_transparency = 0.8 + vim.g.neovide_background_color = "#1e1e2a" end diff --git a/lua/plugins/dev.lua b/lua/plugins/dev.lua index 91dc014..05b2a0b 100644 --- a/lua/plugins/dev.lua +++ b/lua/plugins/dev.lua @@ -1,22 +1,7 @@ -local rt_config = function() - local rt = require "rust-tools" - rt.setup { - server = { - -- on_attach = function(_, bufnr) - -- vim.keymap.set("n", "", rt.hover_actions.hover_actions, { buffer = bufnr }) - -- vim.keymap.set("n", "a", rt.code_action_group.code_action_group, { buffer = bufnr }) - -- end - } - } -end return { { - "simrat39/rust-tools.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - "mfussenegger/nvim-dap", - }, - config = rt_config + "mrcjkb/rustaceanvim", + ft = { "rust" }, }, { "windwp/nvim-autopairs", @@ -33,4 +18,13 @@ return { "mfussenegger/nvim-jdtls", "mfussenegger/nvim-dap", "folke/neodev.nvim", + { + "williamboman/mason.nvim", + config = function() require "mason".setup {} end, + }, + { + "williamboman/mason-lspconfig.nvim", + dependencies = { "williamboman/mason.nvim" }, + config = function() require "mason-lspconfig" end, + }, } diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 5c11727..e6e8d44 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -50,6 +50,7 @@ local config = function() } c.wgsl_analyzer.setup {} c.hls.setup {} + c.slint_lsp.setup {} require 'config.lsp-settings' end @@ -57,6 +58,7 @@ end return { { "neovim/nvim-lspconfig", - config = config + config = config, + dependencies = { "williamboman/mason-lspconfig.nvim"}, }, } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index d3447e2..694989e 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,7 +1,6 @@ return { { "nvim-telescope/telescope.nvim", - tag = "0.1.0", dependencies = { "nvim-lua/plenary.nvim" }, config = function() require("telescope").setup {} diff --git a/lua/plugins/util.lua b/lua/plugins/util.lua index ba41a51..31c09f4 100644 --- a/lua/plugins/util.lua +++ b/lua/plugins/util.lua @@ -1,23 +1,22 @@ return { - { - "nvim-neorg/neorg", - build = ":Neorg sync-parsers", - dependencies = { "nvim-lua/plenary.nvim" }, - config = function() - require("neorg").setup { - load = { - ["core.defaults"] = {}, - ["core.concealer"] = {}, - ["core.completion"] = { - config = { - engine = "nvim-cmp" - } - }, - ["core.export"] = {}, - } - } - end, - }, + -- { + -- "nvim-neorg/neorg", + -- dependencies = { "nvim-lua/plenary.nvim" }, + -- config = function() + -- require("neorg").setup { + -- load = { + -- ["core.defaults"] = {}, + -- ["core.concealer"] = {}, + -- ["core.completion"] = { + -- config = { + -- engine = "nvim-cmp" + -- } + -- }, + -- ["core.export"] = {}, + -- } + -- } + -- end, + -- }, { "folke/which-key.nvim", config = function() diff --git a/lua/plugins/visual.lua b/lua/plugins/visual.lua index 9fcfedc..fd453ce 100644 --- a/lua/plugins/visual.lua +++ b/lua/plugins/visual.lua @@ -32,9 +32,7 @@ return { { "lewis6991/gitsigns.nvim", config = function() - require("gitsigns").setup({ - _signs_staged_enable = true - }) + require("gitsigns").setup() end }, { @@ -74,9 +72,11 @@ return { lookahead = true, keymaps = { ["af"] = "@function.outer", - ["if"] = "@function.inner", + ["kf"] = "@function.inner", ["ac"] = "@class.outer", - ["ic"] = "@class.inner", + ["kc"] = "@class.inner", + ["ap"] = "@parameter.outer", + ["kp"] = "@parameter.inner", }, }, swap = { @@ -88,7 +88,6 @@ return { ["sn"] = "@parameter.inner", }, }, - }, } end