Browse Source

More slight adjustments to nvim config

master
Tovi Jaeschke-Rogers 12 months ago
parent
commit
7c7896659f
8 changed files with 26 additions and 88 deletions
  1. +5
    -5
      .config/nvim/lazy-lock.json
  2. +1
    -1
      .config/nvim/lua/tovi/plugins/copilot.lua
  3. +0
    -3
      .config/nvim/lua/tovi/plugins/init.lua
  4. +1
    -1
      .config/nvim/lua/tovi/plugins/lsp/lspconfig.lua
  5. +2
    -1
      .config/nvim/lua/tovi/plugins/lsp/mason.lua
  6. +0
    -6
      .config/nvim/lua/tovi/plugins/nvim-cmp.lua
  7. +0
    -71
      .config/nvim/lua/tovi/plugins/nvim-tree.lua
  8. +17
    -0
      .config/nvim/lua/tovi/plugins/trouble.lua

+ 5
- 5
.config/nvim/lazy-lock.json View File

@ -6,9 +6,8 @@
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "47ceff644e9d00872f410be374cc973eefa20ba9" },
"copilot.vim": { "branch": "release", "commit": "5b19fb001d7f31c4c7c5556d7a97b243bd29f45f" },
"dart-vim-plugin": { "branch": "master", "commit": "928302ec931caf0dcf21835cca284ccd2b192f7b" },
"conform.nvim": { "branch": "master", "commit": "75e7c5c7eb5fbd53f8b12dc420b31ec70770b231" },
"copilot.vim": { "branch": "release", "commit": "1a55183ef9347d6f420406a3746474b6b9fb9ef5" },
"dressing.nvim": { "branch": "master", "commit": "94b0d24483d56f3777ee0c8dc51675f21709318c" },
"friendly-snippets": { "branch": "main", "commit": "69a2c1675b66e002799f5eef803b87a12f593049" },
"fugitive-gitlab.vim": { "branch": "master", "commit": "55fed481c0309b3405dd3d72921d687bf36873a8" },
@ -19,12 +18,13 @@
"laravel.nvim": { "branch": "main", "commit": "a4d6f85f2be05aca0b4dd1feb8f28cb8b4e68420" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lazygit.nvim": { "branch": "main", "commit": "1e08e3f5ac1152339690140e61a4a32b3bdc7de5" },
"leap.nvim": { "branch": "main", "commit": "b63f14d7474002573710d10f02f1af33a4910490" },
"leap.nvim": { "branch": "main", "commit": "4394f67ccefc64cdb3258c9f22195ed65a13e874" },
"lspkind.nvim": { "branch": "master", "commit": "7f26cf5e27e2bd910ce0ea00c514da2bf97423b8" },
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "0989bdf4fdf7b5aa4c74131d7ffccc3f399ac788" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "8b70e7f1e0a4119c1234c3bde4a01c241cabcc74" },
"mason.nvim": { "branch": "main", "commit": "e110bc3be1a7309617cecd77bfe4bf86ba1b8134" },
"mini.notify": { "branch": "main", "commit": "f430f84e24557f55906c348c9f558665893f9d8c" },
"minintro.nvim": { "branch": "master", "commit": "b7fa58cc549e8d2b362a217a7620d9aedc47d47e" },
"neotest": { "branch": "master", "commit": "1ee3fcc150207f33dba8c9b3f478e5a0148d661d" },
"neotest-go": { "branch": "main", "commit": "d29d20d912aca81a07c50022d880cc66f0d26542" },
@ -36,7 +36,6 @@
"nvim-lint": { "branch": "master", "commit": "8df53b5dde8ea80f0a039775777eae6648a10229" },
"nvim-lsp-file-operations": { "branch": "master", "commit": "8e7223e138590c1bd9d86d3de810e65939d8b12f" },
"nvim-lspconfig": { "branch": "master", "commit": "796394fd19fb878e8dbc4fd1e9c9c186ed07a5f4" },
"nvim-tree.lua": { "branch": "master", "commit": "b8c3a23e76f861d5f0ff3f6714b9b56388984d0b" },
"nvim-treesitter": { "branch": "master", "commit": "8cd2b230174efbf7b5d9f49fe2f90bda6b5eb16e" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "85b9d0cbd4ff901abcda862b50dbb34e0901848b" },
"nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" },
@ -46,6 +45,7 @@
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope-undo.nvim": { "branch": "main", "commit": "d3afc1c105535a90caec092ce27a113f77ba7b84" },
"telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"undotree": { "branch": "master", "commit": "36ff7abb6b60980338344982ad4cdf03f7961ecd" },
"vim-dotenv": { "branch": "master", "commit": "5c51cfcf8d87280d6414e03cd6b253eb70ecb800" },
"vim-fugitive": { "branch": "master", "commit": "59659093581aad2afacedc81f009ed6a4bfad275" },


+ 1
- 1
.config/nvim/lua/tovi/plugins/copilot.lua View File

@ -3,7 +3,7 @@ return {
config = function()
vim.api.nvim_set_keymap(
"i",
"<C-r>",
",,",
'copilot#Accept("<CR>")',
{ expr = true, silent = true }
)


+ 0
- 3
.config/nvim/lua/tovi/plugins/init.lua View File

@ -1,7 +1,4 @@
return {
"nvim-lua/plenary.nvim",
"ray-x/guihua.lua",
-- Programming language specific plugins
"dart-lang/dart-vim-plugin",
}

+ 1
- 1
.config/nvim/lua/tovi/plugins/lsp/lspconfig.lua View File

@ -16,7 +16,7 @@ return {
local keymap = vim.keymap -- for conciseness
local opts = { noremap = true, silent = true }
local on_attach = function(client, bufnr)
local on_attach = function(_, bufnr)
opts.buffer = bufnr
-- set keybinds


+ 2
- 1
.config/nvim/lua/tovi/plugins/lsp/mason.lua View File

@ -47,7 +47,8 @@ return {
"eslint_d",
"jsonlint",
"markdownlint",
"tlint",
"phpcbf",
"phpcs",
"gospel",
"golangci-lint",
"pylint",


+ 0
- 6
.config/nvim/lua/tovi/plugins/nvim-cmp.lua View File

@ -19,12 +19,6 @@ return {
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
require("luasnip.loaders.from_vscode").lazy_load()
-- local has_words_before = function()
-- local line, col = vim.api.nvim_win_get_cursor(0)
-- ---@diagnostic disable-next-line: param-type-mismatch
-- return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
-- end
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match "%s" == nil


+ 0
- 71
.config/nvim/lua/tovi/plugins/nvim-tree.lua View File

@ -1,71 +0,0 @@
return {
"nvim-tree/nvim-tree.lua",
dependancies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
local nvimtree = require("nvim-tree")
local nvimtree_api = require("nvim-tree.api")
-- recommended settings from nvim-tree documentation
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- change color for arrows in tree to light blue
vim.cmd([[ highlight NvimTreeIndentMarker guifg=#3FC5FF ]])
-- configure nvim-tree
nvimtree.setup({
view = {
width = 35,
relativenumber = true,
},
-- change folder arrow icons
renderer = {
indent_markers = {
enable = true,
},
icons = {
glyphs = {
folder = {
arrow_closed = "", -- arrow when folder is closed
arrow_open = "", -- arrow when folder is open
},
},
},
},
-- disable window_picker for
-- explorer to work well with
-- window splits
actions = {
open_file = {
window_picker = {
enable = false,
},
},
},
filters = {
custom = { ".DS_Store" },
},
git = {
ignore = false,
},
})
-- set keymaps
local keymap = vim.keymap -- for conciseness
keymap.set("n", "<C-q>", "<cmd>NvimTreeFindFileToggle<CR>", { desc = "Toggle file explorer" }) -- toggle file explorer
keymap.set("n", "<leader>ee", "<cmd>NvimTreeToggle<CR>", { desc = "Toggle file explorer" }) -- toggle file explorer
keymap.set(
"n",
"<leader>ef",
"<cmd>NvimTreeFindFileToggle<CR>",
{ desc = "Toggle file explorer on current file" }
) -- toggle file explorer on current file
keymap.set("n", "<leader>ec", "<cmd>NvimTreeCollapse<CR>", { desc = "Collapse file explorer" }) -- collapse file explorer
keymap.set("n", "<leader>er", "<cmd>NvimTreeRefresh<CR>", { desc = "Refresh file explorer" }) -- refresh file explorer
keymap.set("n", "?", nvimtree_api.tree.toggle_help, { desc = "Toggle nvim tree help" })
end,
}

+ 17
- 0
.config/nvim/lua/tovi/plugins/trouble.lua View File

@ -0,0 +1,17 @@
return {
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function ()
local trouble = require("trouble");
vim.keymap.set("n", "<leader>xx", trouble.toggle);
vim.keymap.set("n", "[D", function ()
trouble.open();
trouble.previous({skip_groups = true, jump = true});
end)
vim.keymap.set("n", "]D", function ()
trouble.open();
require("trouble").next({skip_groups = true, jump = true});
end)
end
}

Loading…
Cancel
Save