Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- 'feature/**'

env:
version: '10.7.${{ github.run_number }}'
version: '10.8.${{ github.run_number }}'
dotnetVersion: '8'
repoUrl: ${{ github.server_url }}/${{ github.repository }}
vsixPath: src/CodeNav/bin/Release/net472/CodeNav.vsix
Expand Down
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<img src="https://raw.githubusercontent.com/sboulema/CodeNav/main/art/Logo_90x90.png" />
<img src="https://raw.githubusercontent.com/sboulema/CodeNav/main/art/Logo_90x90.png" />

# CodeNav
Visual Studio extension to show the code structure of your current document

[![Sponsor](https://img.shields.io/badge/-Sponsor-fafbfc?logo=GitHub%20Sponsors)](https://github.com/sponsors/sboulema)

## Features
# Features
- Quickly see all the important methods and properties in your document
- Never get lost during a refactoring of a super long document
- Clicking on an item in the list will take you to that location in the document
Expand All @@ -23,27 +23,28 @@ Visual Studio extension to show the code structure of your current document
- Bookmarks
- Synced collapsing/expanding outline regions
- Option to hide the tool window for unsupported files and files without code items
- Compact mode with less spacing optimizing screen real estate


## Supported Visual Studio versions
# 💻 Supported Visual Studio versions

- Visual Studio 2022 (Untested)
- Visual Studio 2026

## Language support
# 🔤 Language support
- C#

## Installing
[Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SamirBoulema.CodeNav2026) [![Visual Studio Marketplace](https://img.shields.io/vscode-marketplace/v/SamirBoulema.CodeNav2026.svg?style=flat)](https://marketplace.visualstudio.com/items?itemName=SamirBoulema.CodeNav2026)
# ⬇️ Installing
[Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SamirBoulema.CodeNav2026)

[GitHub Releases](https://github.com/sboulema/CodeNav/releases)

[Open VSIX Gallery](https://www.vsixgallery.com/extension/CodeNav.dcdbcca4-3a88-432f-ba04-eb4a4cb64437)

## Usage
# 🤲 Usage
The CodeNav tool window can be opened via the entry in the `Extensions` menu.

## Screenshots
# 🖼️ Screenshots
![Preview](https://raw.githubusercontent.com/sboulema/CodeNav/main/art/Screenshot-light.png) ![Preview-Dark](https://raw.githubusercontent.com/sboulema/CodeNav/main/art/Screenshot-dark.png)

#### Filter window
Expand All @@ -55,5 +56,8 @@ The CodeNav tool window can be opened via the entry in the `Extensions` menu.
#### Bookmarks
![Bookmarks](https://raw.githubusercontent.com/sboulema/CodeNav/main/art/Bookmarks.png)

## Documentation
#### Compact mode
![Compact](https://raw.githubusercontent.com/sboulema/CodeNav/main/art/Compact.png)

# 📄 Documentation
Looking for more info? Read the full [Documentation](https://github.com/sboulema/CodeNav/blob/main/docs/index.md) with links, guides, troubleshooting, and tips.
Binary file added art/Compact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified art/Screenshot-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified art/Settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Enable or disable highlighting the item in CodeNav based on caret position

Enable or disable showing the CodeNav tool window for unsupported files and files without code items

**Use compact mode with less spacing**

Enable or disable showing items in a condensed form with less vertical spacing optimizing screen real estate

**Update CodeNav while typing**

Enable of disable updating the list of code items in CodeNav while typing in the text editor
Expand Down
1 change: 1 addition & 0 deletions src/CodeNav.OutOfProc/CodeNav.OutOfProc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<None Remove="ToolWindows\Templates\HighlightNameStyle.xaml" />
<None Remove="ToolWindows\Templates\ItemContextMenu.xaml" />
<None Remove="ToolWindows\Templates\ToolbarStyles.xaml" />
<None Remove="ViewModels\CodeItem.cs~RF32119e8.TMP" />
<EmbeddedResource Include="Dialogs\FilterDialog\FilterDialogControl.xaml" />
<EmbeddedResource Include="Dialogs\SettingsDialog\SettingsDialogControl.xaml" />
<EmbeddedResource Include="ToolWindows\CodeNavToolWindowControl.xaml" />
Expand Down
28 changes: 14 additions & 14 deletions src/CodeNav.OutOfProc/Dialogs/FilterDialog/FilterDialogControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
<Style TargetType="GridViewColumnHeader">
<Setter Property="Background" Value="{DynamicResource {x:Static styles:VsBrushes.GridHeadingBackgroundKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static styles:VsBrushes.GridHeadingTextKey}}"/>
<Setter Property="Margin" Value="-4,-2,0,0"/>
<Setter Property="Padding" Value="4,2,0,0"/>
<Setter Property="Margin" Value="-4 -2 0 0"/>
<Setter Property="Padding" Value="4 2 0 0"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
<!-- General Styles -->
<Style TargetType="ComboBox" BasedOn="{StaticResource {x:Static styles:VsResourceKeys.ThemedDialogComboBoxStyleKey}}"/>
<Style TargetType="TextBox" BasedOn="{StaticResource {x:Static styles:VsResourceKeys.ThemedDialogTextBoxStyleKey}}"/>
<Style TargetType="TextBlock">
<Setter Property="Margin" Value="0,0,0,8" />
<Setter Property="Margin" Value="0 0 0 8" />
</Style>
<Style TargetType="CheckBox">
<Setter Property="HorizontalAlignment" Value="Center" />
Expand All @@ -48,9 +48,9 @@
<DataTemplate>
<Border
BorderBrush="{DynamicResource {x:Static styles:VsBrushes.StartPageTextSubHeadingSelectedKey}}"
BorderThickness="0,0,1,0"
Margin="-6,-3,-6,-3">
<StackPanel Margin="6,2,6,2" VerticalAlignment="Center">
BorderThickness="0 0 1 0"
Margin="-6 -3 -6 -3">
<StackPanel Margin="6 2 6 2" VerticalAlignment="Center">
<ComboBox SelectedItem="{Binding Kind, Mode=TwoWay}" ItemsSource="{Binding KindArray}" />
</StackPanel>
</Border>
Expand All @@ -71,9 +71,9 @@
<DataTemplate>
<Border
BorderBrush="{DynamicResource {x:Static styles:VsBrushes.StartPageTextSubHeadingSelectedKey}}"
BorderThickness="0,0,1,0"
Margin="-6,-3,-6,-3">
<StackPanel Margin="6,2,6,2" VerticalAlignment="Center">
BorderThickness="0 0 1 0"
Margin="-6 -3 -6 -3">
<StackPanel Margin="6 2 6 2" VerticalAlignment="Center">
<CheckBox
IsThreeState="True"
IsChecked="{Binding IsEmpty}"
Expand Down Expand Up @@ -127,11 +127,11 @@
</ListView.View>
</ListView>

<StackPanel Grid.Row="1" Margin="0,5,0,0" Orientation="Horizontal">
<StackPanel Grid.Row="1" Margin="0 5 0 0" Orientation="Horizontal">
<Button
Command="{Binding Path=AddFilterCommand}"
ToolTip="Add filter"
Margin="0,0,4,0">
Margin="0 0 4 0">
<Button.Content>
<vs:Image Source="KnownMonikers.NewFilter" Width="16" Height="16" />
</Button.Content>
Expand All @@ -140,7 +140,7 @@
<Button
Command="{Binding Path=DeleteFilterCommand}"
ToolTip="Delete filter"
Margin="0,0,4,0">
Margin="0 0 4 0">
<Button.Content>
<vs:Image Source="KnownMonikers.DeleteFilter" Width="16" Height="16" />
</Button.Content>
Expand All @@ -149,7 +149,7 @@
<Button
Command="{Binding Path=MoveFilterUpCommand}"
ToolTip="Move up"
Margin="0,0,4,0">
Margin="0 0 4 0">
<Button.Content>
<vs:Image Source="KnownMonikers.MoveUp" Width="16" Height="16" />
</Button.Content>
Expand All @@ -167,7 +167,7 @@
<GroupBox
Grid.Row="2"
Header="Filter help"
Margin="0,5"
Margin="0 5"
Padding="5">
<StackPanel>
<TextBlock>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<DataTemplate.Resources>
<Style TargetType="TextBox" BasedOn="{StaticResource {x:Static styles:VsResourceKeys.ThemedDialogTextBoxStyleKey}}" />
<Style TargetType="CheckBox" BasedOn="{StaticResource {x:Static styles:VsResourceKeys.ThemedDialogCheckBoxStyleKey}}">
<Setter Property="Margin" Value="0,5" />
<Setter Property="Margin" Value="0 5" />
</Style>
<Style TargetType="Label" BasedOn="{StaticResource {x:Static styles:VsResourceKeys.ThemedDialogLabelStyleKey}}">
<Setter Property="Margin" Value="-5,0,0,0" />
<Setter Property="Margin" Value="-5 0 0 0" />
</Style>
</DataTemplate.Resources>

Expand All @@ -35,6 +35,10 @@
<CheckBox IsChecked="{Binding ShowToolWindowForUnsupportedFiles, Mode=TwoWay}">
Show the tool window for unsupported files and files without code items
</CheckBox>

<CheckBox IsChecked="{Binding UseCompactMode, Mode=TwoWay}">
Use compact mode with less spacing
</CheckBox>
</StackPanel>
</GroupBox>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,10 @@ public class SettingsDialogData
/// </summary>
[DataMember]
public bool ShowToolWindowForUnsupportedFiles { get; set; } = true;

/// <summary>
/// Setting if CodeNav should use a compact mode with less vertical margins
/// </summary>
[DataMember]
public bool UseCompactMode { get; set; }
}
9 changes: 6 additions & 3 deletions src/CodeNav.OutOfProc/Models/GlobalSettings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CodeNav.OutOfProc.Constants;
using System.Runtime.Serialization;

namespace CodeNav.OutOfProc.Models;

Expand Down Expand Up @@ -36,11 +35,15 @@ public class GlobalSettings
public bool EnableCrashAnalytics { get; set; }

/// <summary>
/// Setting if CodeNav should be shown or hidden for unsupported files and files without code items
/// Settings dialog - Setting if CodeNav should be shown or hidden for unsupported files and files without code items
/// </summary>
[DataMember]
public bool ShowToolWindowForUnsupportedFiles { get; set; } = true;

/// <summary>
/// Settings dialog - Setting if CodeNav should use a compact mode with less vertical margins
/// </summary>
public bool UseCompactMode { get; set; }

/// <summary>
/// Main toolbar - Setting to store the selected sort order for code items
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions src/CodeNav.OutOfProc/Services/CodeDocumentService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public async Task LoadGlobalSettings(bool readFromDisk = false)
UpdateWhileTyping = GlobalSettings.UpdateWhileTyping,
EnableCrashAnalytics = GlobalSettings.EnableCrashAnalytics,
ShowToolWindowForUnsupportedFiles = GlobalSettings.ShowToolWindowForUnsupportedFiles,
UseCompactMode = GlobalSettings.UseCompactMode,
};

var filterRules = GlobalSettings
Expand Down
16 changes: 8 additions & 8 deletions src/CodeNav.OutOfProc/ToolWindows/CodeNavToolWindowControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</Grid.RowDefinitions>

<!-- Main Toolbar -->
<StackPanel Orientation="Horizontal" Margin="0,0,0,4">
<StackPanel Orientation="Horizontal" Margin="0 0 0 4">
<Button
Command="{Binding Path=RefreshCommand}"
ToolTip="Refresh"
Expand All @@ -30,7 +30,7 @@
</Button.Content>
</Button>

<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Margin="2,0" />
<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Margin="2 0" />

<RadioButton
Command="{Binding Path=SortByNameCommand}"
Expand Down Expand Up @@ -62,7 +62,7 @@
</RadioButton.Content>
</RadioButton>

<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Margin="2,0" />
<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Margin="2 0" />

<Button
Command="{Binding Path=ExpandAllCommand}"
Expand All @@ -82,7 +82,7 @@
</Button.Content>
</Button>

<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Margin="2,0" />
<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Margin="2 0" />

<Button
Command="{Binding Path=SettingsCommand}"
Expand Down Expand Up @@ -111,8 +111,8 @@
Text="Search CodeNav"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Margin="4,0,0,0"
Padding="0,0,10,0"
Margin="4 0 0 0"
Padding="0 0 10 0"
Foreground="DarkGray">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
Expand Down Expand Up @@ -166,7 +166,7 @@
<!-- Code items -->
<Border Grid.Row="2"
BorderBrush="{DynamicResource {x:Static styles:VsBrushes.ComboBoxBorderKey}}"
Margin="0,4,0,0">
Margin="0 4 0 0">
<ScrollViewer x:Name="CodeItemsScrollViewer" VerticalScrollBarVisibility="Auto">
<ItemsControl
ItemsSource="{Binding CodeItems}"
Expand Down Expand Up @@ -195,7 +195,7 @@
<Style TargetType="{x:Type Border}">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=CodeItemsScrollViewer, Path=ComputedVerticalScrollBarVisibility}" Value="Visible">
<Setter Property="BorderThickness" Value="0,1,1,1" />
<Setter Property="BorderThickness" Value="0 1 1 1" />
</DataTrigger>
</Style.Triggers>
</Style>
Expand Down
Loading
Loading