mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-26 07:15:37 +00:00
refactor vim settings
This commit is contained in:
parent
7a39acef1a
commit
33e8a6bc9b
@ -26,30 +26,6 @@
|
||||
|
||||
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 = ''
|
||||
${builtins.readFile ./lsp.lua}
|
||||
|
||||
|
@ -13,28 +13,33 @@
|
||||
setup.Comment = { };
|
||||
setup.colorizer = { };
|
||||
|
||||
vim.o.termguicolors = true; # Set to truecolor
|
||||
vim.o.hidden = true; # Don't unload buffers when leaving them
|
||||
vim.wo.number = true; # Show line numbers
|
||||
vim.wo.relativenumber = true; # Relative numbers instead of absolute
|
||||
vim.o.list = true; # Reveal whitespace with dashes
|
||||
vim.o.expandtab = true; # Tabs into spaces
|
||||
vim.o.shiftwidth = 4; # Amount to shift with > key
|
||||
vim.o.softtabstop = 4; # Amount to shift with <TAB> key
|
||||
vim.o.ignorecase = true; # Ignore case when searching
|
||||
vim.o.smartcase = true; # Check case when using capitals in search
|
||||
vim.o.infercase = true; # Don't match cases when completing suggestions
|
||||
vim.o.incsearch = true; # Search while typing
|
||||
vim.o.visualbell = true; # No sounds
|
||||
vim.o.scrolljump = 1; # Number of lines to scroll
|
||||
vim.o.scrolloff = 3; # Margin of lines to see while scrolling
|
||||
vim.o.splitright = true; # Vertical splits on the right side
|
||||
vim.o.splitbelow = true; # Horizontal splits on the bottom side
|
||||
vim.o.pastetoggle = "<F3>"; # Use F3 to enter raw paste mode
|
||||
vim.o.clipboard = "unnamedplus"; # Uses system clipboard for yanking
|
||||
vim.o.updatetime = 300; # Faster diagnostics
|
||||
vim.o.mouse = "nv"; # Mouse interaction / scrolling
|
||||
vim.o.inccommand = "split"; # Live preview search and replace
|
||||
vim.o = {
|
||||
termguicolors = true; # Set to truecolor
|
||||
hidden = true; # Don't unload buffers when leaving them
|
||||
list = true; # Reveal whitespace with dashes
|
||||
expandtab = true; # Tabs into spaces
|
||||
shiftwidth = 4; # Amount to shift with > key
|
||||
softtabstop = 4; # Amount to shift with <TAB> key
|
||||
ignorecase = true; # Ignore case when searching
|
||||
smartcase = true; # Check case when using capitals in search
|
||||
infercase = true; # Don't match cases when completing suggestions
|
||||
incsearch = true; # Search while typing
|
||||
visualbell = true; # No sounds
|
||||
scrolljump = 1; # Number of lines to scroll
|
||||
scrolloff = 3; # Margin of lines to see while scrolling
|
||||
splitright = true; # Vertical splits on the right side
|
||||
splitbelow = true; # Horizontal splits on the bottom side
|
||||
pastetoggle = "<F3>"; # Use F3 to enter raw paste mode
|
||||
clipboard = "unnamedplus"; # Uses system clipboard for yanking
|
||||
updatetime = 300; # Faster diagnostics
|
||||
mouse = "nv"; # Mouse interaction / scrolling
|
||||
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
|
||||
vim.o.backup = true; # Easier to recover and more secure
|
||||
|
@ -4,8 +4,10 @@
|
||||
|
||||
# Disable netrw eagerly
|
||||
# https://github.com/kyazdani42/nvim-tree.lua/commit/fb8735e96cecf004fbefb086ce85371d003c5129
|
||||
vim.g.loaded = 1;
|
||||
vim.g.loaded_netrwPlugin = 1;
|
||||
vim.g = {
|
||||
loaded = 1;
|
||||
loaded_netrwPlugin = 1;
|
||||
};
|
||||
|
||||
setup.nvim-tree = {
|
||||
disable_netrw = true;
|
||||
|
Loading…
Reference in New Issue
Block a user