Skip to content

Commit

Permalink
add navic
Browse files Browse the repository at this point in the history
  • Loading branch information
viperML committed Aug 19, 2024
1 parent c6ac340 commit 81aae6b
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 2 deletions.
20 changes: 20 additions & 0 deletions modules/wrapper-manager/neovim/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,26 @@
},
"version": "v0.1.8"
},
"nvim-navic": {
"cargoLocks": null,
"date": "2023-11-30",
"extract": null,
"name": "nvim-navic",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "SmiteshP",
"repo": "nvim-navic",
"rev": "8649f694d3e76ee10c19255dece6411c29206a54",
"sha256": "sha256-0p5n/V8Jlj9XyxV/fuMwsbQ7oV5m9H2GqZZEA/njxCQ=",
"type": "github"
},
"version": "8649f694d3e76ee10c19255dece6411c29206a54"
},
"nvim-paredit": {
"cargoLocks": null,
"date": null,
Expand Down
12 changes: 12 additions & 0 deletions modules/wrapper-manager/neovim/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,18 @@
sha256 = "sha256-foJ7a59N0a3QaBW24PtwbyYDQVlIsFxiatADLO/hQvc=";
};
};
nvim-navic = {
pname = "nvim-navic";
version = "8649f694d3e76ee10c19255dece6411c29206a54";
src = fetchFromGitHub {
owner = "SmiteshP";
repo = "nvim-navic";
rev = "8649f694d3e76ee10c19255dece6411c29206a54";
fetchSubmodules = false;
sha256 = "sha256-0p5n/V8Jlj9XyxV/fuMwsbQ7oV5m9H2GqZZEA/njxCQ=";
};
date = "2023-11-30";
};
nvim-paredit = {
pname = "nvim-paredit";
version = "v0.11.0";
Expand Down
4 changes: 4 additions & 0 deletions modules/wrapper-manager/neovim/nvfetcher.toml
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,7 @@ passthru.opt = "true"
[nvim-lsp-file-operations]
fetch.github = "antosha417/nvim-lsp-file-operations"
src.git = "https://github.com/antosha417/nvim-lsp-file-operations"

[nvim-navic]
fetch.github = "SmiteshP/nvim-navic"
src.git = "https://github.com/SmiteshP/nvim-navic"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ local root_pattern = nvim_lsp.util.root_pattern
local DEBUG = vim.log.levels.DEBUG

nvim_lsp.util.default_config = vim.tbl_extend("force", nvim_lsp.util.default_config, {
on_attach = function(client, bufnr)
if client.server_capabilities.documentSymbolProvider then
vim.notify("Attaching navic")
require("nvim-navic").attach(client, bufnr)
else
vim.notify("Not attaching navic")
end
end,
capabilities = vim.tbl_extend(
"force",
require("cmp_nvim_lsp").default_capabilities(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vim.opt.termguicolors = true

require("bufferline").setup {
options = {
always_show_bufferline = false,
-- always_show_bufferline = false,
right_mouse_command = nil,
middle_mouse_command = "bdelete! %d",
indicator = {
Expand All @@ -34,6 +34,22 @@ require("lualine").setup {
"neo-tree",
},
},
winbar = {
lualine_c = {
"filename",
{
"navic",
color_correction = nil,
navic_opts = {
},
}
},
},
inactive_winbar = {
lualine_c = {
"filename",
},
},
sections = {
lualine_a = { "mode" },
lualine_b = { "branch", "diff" },
Expand All @@ -50,7 +66,7 @@ require("lualine").setup {
"encoding",
"filesize",
},
lualine_y = { "filetype", "filename" },
lualine_y = { "filetype" },
lualine_z = { "location" },
},
}
Expand Down

0 comments on commit 81aae6b

Please sign in to comment.