refactor vim settings

This commit is contained in:
Noah Masur 2022-11-29 09:35:39 -07:00
parent 7a39acef1a
commit 33e8a6bc9b
3 changed files with 31 additions and 48 deletions

View File

@ -26,30 +26,6 @@
vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ]; vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ];
# setup."null-ls" = {
# sources = [
# (dsl.rawLua
# "require('null-ls').builtins.formatting.black.with({ command = ${pkgs.black}/bin/black })")
# (dsl.rawLua
# "require('null-ls').builtins.formatting.flake8.with({ command = ${pkgs.python310Packages.flake8}/bin/flake8 })")
# (dsl.rawLua
# "require('null-ls').builtins.formatting.fish_indent.with({ command = ${pkgs.fish}/bin/fish_indent })")
# (dsl.rawLua
# "require('null-ls').builtins.formatting.nixfmt.with({ command = ${pkgs.nixfmt}/bin/nixfmt })")
# (dsl.rawLua
# "require('null-ls').builtins.formatting.rustfmt.with({ command = ${pkgs.rustfmt}/bin/rustfmt })")
# (dsl.rawLua
# "require('null-ls').builtins.diagnostics.shellcheck.with({ command = ${pkgs.shellcheck}/bin/shellcheck })")
# (dsl.rawLua ''
# require('null-ls').builtins.formatting.shfmt.with(
# command = {${pkgs.shfmt}/bin/shfmt },
# extra_args = { '-i', '4', '-ci' },
# )'')
# (dsl.rawLua
# "require('null-ls').builtins.formatting.terraform_fmt.with({ command = ${pkgs.terraform}/bin/terraform })")
# ];
# };
lua = '' lua = ''
${builtins.readFile ./lsp.lua} ${builtins.readFile ./lsp.lua}

View File

@ -13,28 +13,33 @@
setup.Comment = { }; setup.Comment = { };
setup.colorizer = { }; setup.colorizer = { };
vim.o.termguicolors = true; # Set to truecolor vim.o = {
vim.o.hidden = true; # Don't unload buffers when leaving them termguicolors = true; # Set to truecolor
vim.wo.number = true; # Show line numbers hidden = true; # Don't unload buffers when leaving them
vim.wo.relativenumber = true; # Relative numbers instead of absolute list = true; # Reveal whitespace with dashes
vim.o.list = true; # Reveal whitespace with dashes expandtab = true; # Tabs into spaces
vim.o.expandtab = true; # Tabs into spaces shiftwidth = 4; # Amount to shift with > key
vim.o.shiftwidth = 4; # Amount to shift with > key softtabstop = 4; # Amount to shift with <TAB> key
vim.o.softtabstop = 4; # Amount to shift with <TAB> key ignorecase = true; # Ignore case when searching
vim.o.ignorecase = true; # Ignore case when searching smartcase = true; # Check case when using capitals in search
vim.o.smartcase = true; # Check case when using capitals in search infercase = true; # Don't match cases when completing suggestions
vim.o.infercase = true; # Don't match cases when completing suggestions incsearch = true; # Search while typing
vim.o.incsearch = true; # Search while typing visualbell = true; # No sounds
vim.o.visualbell = true; # No sounds scrolljump = 1; # Number of lines to scroll
vim.o.scrolljump = 1; # Number of lines to scroll scrolloff = 3; # Margin of lines to see while scrolling
vim.o.scrolloff = 3; # Margin of lines to see while scrolling splitright = true; # Vertical splits on the right side
vim.o.splitright = true; # Vertical splits on the right side splitbelow = true; # Horizontal splits on the bottom side
vim.o.splitbelow = true; # Horizontal splits on the bottom side pastetoggle = "<F3>"; # Use F3 to enter raw paste mode
vim.o.pastetoggle = "<F3>"; # Use F3 to enter raw paste mode clipboard = "unnamedplus"; # Uses system clipboard for yanking
vim.o.clipboard = "unnamedplus"; # Uses system clipboard for yanking updatetime = 300; # Faster diagnostics
vim.o.updatetime = 300; # Faster diagnostics mouse = "nv"; # Mouse interaction / scrolling
vim.o.mouse = "nv"; # Mouse interaction / scrolling inccommand = "split"; # Live preview search and replace
vim.o.inccommand = "split"; # Live preview search and replace };
vim.wo = {
number = true; # Show line numbers
relativenumber = true; # Relative numbers instead of absolute
};
# Better backup, swap and undo storage # Better backup, swap and undo storage
vim.o.backup = true; # Easier to recover and more secure vim.o.backup = true; # Easier to recover and more secure

View File

@ -4,8 +4,10 @@
# Disable netrw eagerly # Disable netrw eagerly
# https://github.com/kyazdani42/nvim-tree.lua/commit/fb8735e96cecf004fbefb086ce85371d003c5129 # https://github.com/kyazdani42/nvim-tree.lua/commit/fb8735e96cecf004fbefb086ce85371d003c5129
vim.g.loaded = 1; vim.g = {
vim.g.loaded_netrwPlugin = 1; loaded = 1;
loaded_netrwPlugin = 1;
};
setup.nvim-tree = { setup.nvim-tree = {
disable_netrw = true; disable_netrw = true;