added enable option to nvim
changed home-manager personal config namespace from home.* to user.*
This commit is contained in:
parent
322788aa3a
commit
6f0e167087
30 changed files with 539 additions and 525 deletions
|
@ -4,32 +4,16 @@
|
|||
lib,
|
||||
...
|
||||
}: {
|
||||
home.file = {
|
||||
".clangd".text = ''
|
||||
# keeps clangd from choking when it sees a compiler flag for a different
|
||||
# compiler. (sutch as when acting as an lsp for a project that uses GCC.)
|
||||
CompileFlags:
|
||||
Add: -Wno-unknown-warning-option
|
||||
Remove: [-m*, -f*]
|
||||
'';
|
||||
".clang-format".text = ''
|
||||
---
|
||||
#this syncronizes with settings used by neovims treesitters so that the lsp formatting and treesitter formatting do not fight eatch other.
|
||||
PointerAlignment: Left
|
||||
ColumnLimit: 80
|
||||
IndentWidth: 4
|
||||
TabWidth: 4
|
||||
UseCRLF: false
|
||||
UseTab: Never
|
||||
AlignAfterOpenBracket: BlockIndent
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
BreakBeforeBraces: Attach
|
||||
AlignOperands: Align
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
...
|
||||
'';
|
||||
"work/.clang-format" = lib.mkIf config.home.git.workProfile.enable {
|
||||
text = ''
|
||||
config = lib.mkIf (config.user.nvim.enable && config.user.nvim.enable-lsp) {
|
||||
home.file = {
|
||||
".clangd".text = ''
|
||||
# keeps clangd from choking when it sees a compiler flag for a different
|
||||
# compiler. (sutch as when acting as an lsp for a project that uses GCC.)
|
||||
CompileFlags:
|
||||
Add: -Wno-unknown-warning-option
|
||||
Remove: [-m*, -f*]
|
||||
'';
|
||||
".clang-format".text = ''
|
||||
---
|
||||
#this syncronizes with settings used by neovims treesitters so that the lsp formatting and treesitter formatting do not fight eatch other.
|
||||
PointerAlignment: Left
|
||||
|
@ -40,10 +24,28 @@
|
|||
UseTab: Never
|
||||
AlignAfterOpenBracket: BlockIndent
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
BreakBeforeBraces: Allman
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Attach
|
||||
AlignOperands: Align
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
...
|
||||
'';
|
||||
"work/.clang-format" = lib.mkIf config.user.git.workProfile.enable {
|
||||
text = ''
|
||||
---
|
||||
#this syncronizes with settings used by neovims treesitters so that the lsp formatting and treesitter formatting do not fight eatch other.
|
||||
PointerAlignment: Left
|
||||
ColumnLimit: 80
|
||||
IndentWidth: 4
|
||||
TabWidth: 4
|
||||
UseCRLF: false
|
||||
UseTab: Never
|
||||
AlignAfterOpenBracket: BlockIndent
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
BreakBeforeBraces: Allman
|
||||
BreakBeforeBinaryOperators: None
|
||||
...
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,14 +4,12 @@
|
|||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
home.nvim.enable-lsp = lib.mkEnableOption "nvim lsp";
|
||||
};
|
||||
options.user.nvim.enable-lsp = lib.mkEnableOption "nvim lsp";
|
||||
|
||||
config =
|
||||
lib.mkIf config.home.nvim.enable-lsp
|
||||
lib.mkIf (config.user.nvim.enable-lsp && config.user.nvim.enable)
|
||||
{
|
||||
home.nvim.enable-completions = true;
|
||||
user.nvim.enable-completions = true;
|
||||
programs.nixvim = {
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}: {
|
||||
config =
|
||||
lib.mkIf config.home.nvim.enable-lsp
|
||||
lib.mkIf (config.user.nvim.enable-lsp && config.user.nvim.enable)
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.rust-tools = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue