ascension (re enable primary c+p, treesitter textobjects

This commit is contained in:
iris committed 2023-06-20 15:06:30 -04:00
1 parent 96c139a62e
commit 84782e1599
11 files changed
+126 -58

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
vim.filetype.add({
extension = {
wgsl = 'wgsl',
},
})
+5 -1
View File
@@ -11,6 +11,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
end
local builtin = require('telescope.builtin')
local dap = require('dap')
map("gd", builtin.lsp_definitions)
map("gr", builtin.lsp_references)
@@ -28,9 +29,12 @@ vim.api.nvim_create_autocmd('LspAttach', {
end)
map("<leader>D", vim.lsp.buf.type_definition)
map("<leader>rn", vim.lsp.buf.rename)
map("<leader>ca", vim.lsp.buf.code_action)
map("<leader>a", vim.lsp.buf.code_action)
map("<leader>fm", function()
vim.lsp.buf.format { async = true }
end)
map("<leader>da", dap.toggle_breakpoint)
map("<leader>dc", dap.continue)
map("<leader>ds", dap.step_into)
end
})
-4
View File
@@ -8,10 +8,6 @@ local l = "o"
local m = u.mapping
-- terminal copy paste
m.map("v", "<C-c>", '"+y')
m.map("i", "<C-v>", '<esc>"+p`]a')
-- terminal
m.map("t", "<esc>", "<C-\\><C-n>")
m.map("t", "<tab>", "<tab>")
+1
View File
@@ -11,4 +11,5 @@ for _, mod in ipairs({
"utils",
"theme",
"lsp-settings",
"filetype",
}) do u.mod_post_write(g, "config." .. mod, u.reload) end
+7
View File
@@ -4,11 +4,13 @@ local g = vim.g
-- basic stuff
o.number = true
o.showmode = false
o.clipboard = "unnamedplus"
g.mapleader = " "
g.maplocalleader = ","
vim.cmd("filetype plugin on")
vim.cmd("syntax on")
o.guifont = "Comic\\ Code\\ Ligatures"
-- line break (wrapping) settings
o.linebreak = true
@@ -40,3 +42,8 @@ end
vim.diagnostic.config({
virtual_text = { prefix = "" },
})
-- neovide
if vim.g.neovide then
end
+9 -16
View File
@@ -9,22 +9,15 @@ end
hl("ExtraWhitespace", { ctermbg = "red", bg = "#ff8888" })
vim.cmd [[match ExtraWhitespace /\s\+$/]]
local bg = "#201918"
-- make background partially transparent
-- local bg = "#1e1e2e"
-- local bg2 = "#181825"
-- make background transparent
-- gbhl("Normal", "none")
-- gbhl("EndOfBuffer", "none")
-- gbhl("SignColumn", "none")
-- gbhl("NeoTreeEndOfBuffer", "none")
-- gbhl("NormalNC", "none")
-- gbhl("MsgArea", bg)
-- gbhl("NeoTreeNormal", bg)
-- gbhl("NeoTreeNormalNC", bg)
-- hl("VertSplit", { bg = bg2, fg = bg2 })
--[=[
for _, name in ipairs({
"NeoTreeNormal",
"NeoTreeNormalNC",
"MsgArea",
"lualine_a_command",
"lualine_a_inactive",
"lualine_b_inactive",
"lualine_c_inactive",
}) do gbhl(name, bg) end
]=]--
+36
View File
@@ -0,0 +1,36 @@
local rt_config = function()
local rt = require "rust-tools"
rt.setup {
server = {
-- on_attach = function(_, bufnr)
-- vim.keymap.set("n", "<C-k>", rt.hover_actions.hover_actions, { buffer = bufnr })
-- vim.keymap.set("n", "<Leader>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
},
{
"windwp/nvim-autopairs",
config = function() require "nvim-autopairs".setup {} end
},
{
"scalameta/nvim-metals",
dependencies = { "nvim-lua/plenary.nvim" }
},
{
"numToStr/Comment.nvim",
config = function() require "Comment".setup {} end
},
"mfussenegger/nvim-jdtls",
"mfussenegger/nvim-dap",
"folke/neodev.nvim",
}
-24
View File
@@ -1,24 +0,0 @@
return {
{
"simrat39/rust-tools.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"mfussenegger/nvim-dap",
},
config = function() require "rust-tools".setup {} end
},
{
"windwp/nvim-autopairs",
config = function() require "nvim-autopairs".setup {} end
},
{
"scalameta/nvim-metals",
dependencies = { "nvim-lua/plenary.nvim" }
},
{
"numToStr/Comment.nvim",
config = function() require "Comment".setup{} end
},
"mfussenegger/nvim-jdtls",
"folke/neodev.nvim",
}
+1
View File
@@ -48,6 +48,7 @@ local config = function()
}
}
}
c.wgsl_analyzer.setup {}
require 'config.lsp-settings'
end
+61 -13
View File
@@ -10,14 +10,6 @@ return {
require("config.theme")
end
},
{
"norcalli/nvim-colorizer.lua",
config = function()
if vim.o.termguicolors then
require("colorizer").setup()
end
end
},
{
"nvim-lualine/lualine.nvim",
dependencies = { "kyazdani42/nvim-web-devicons" },
@@ -29,6 +21,14 @@ return {
}
end
},
{
"norcalli/nvim-colorizer.lua",
config = function()
if vim.o.termguicolors then
require("colorizer").setup()
end
end
},
{
"lewis6991/gitsigns.nvim",
config = function()
@@ -37,6 +37,59 @@ return {
})
end
},
{
"nvim-treesitter/nvim-treesitter-textobjects",
lazy = false,
enabled = true,
dependencies = { "nvim-treesitter/nvim-treesitter" },
config = function()
require("nvim-treesitter.configs").setup {
highlight = { enable = true },
textobjects = {
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
["]f"] = "@function.outer",
["]]"] = "@class.outer",
},
goto_next_end = {
["]F"] = "@function.outer",
["]["] = "@class.outer",
},
goto_previous_start = {
["[f"] = "@function.outer",
["[["] = "@class.outer",
},
goto_previous_end = {
["[F"] = "@function.outer",
["[]"] = "@class.outer",
},
},
select = {
enable = true,
lookahead = true,
keymaps = {
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
},
swap = {
enable = true,
swap_next = {
["<leader>so"] = "@parameter.inner",
},
swap_previous = {
["<leader>sn"] = "@parameter.inner",
},
},
},
}
end
},
{
"nvim-treesitter/nvim-treesitter",
build = function()
@@ -44,11 +97,6 @@ return {
with_sync = true
}
end,
config = function()
require("nvim-treesitter.configs").setup {
highlight = { enable = true }
}
end,
},
"elkowar/yuck.vim",
"kmonad/kmonad-vim"