mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
formatted
This commit is contained in:
parent
8ab516982b
commit
7f76af0227
1 changed files with 44 additions and 44 deletions
|
|
@ -1,53 +1,53 @@
|
||||||
-- Line Numbering
|
-- Line Numbering
|
||||||
vim.o.relativenumber = true
|
vim.o.relativenumber = true
|
||||||
vim.o.number = true
|
vim.o.number = true
|
||||||
vim.cmd('highlight LineNr ctermfg=DarkGray')
|
vim.cmd('highlight LineNr ctermfg=DarkGray')
|
||||||
|
|
||||||
-- Enable clipboard
|
-- Enable clipboard
|
||||||
vim.o.clipboard = "unnamedplus"
|
vim.o.clipboard = "unnamedplus"
|
||||||
|
|
||||||
-- Keep Cursor
|
-- Keep Cursor
|
||||||
vim.o.guicursor = ''
|
vim.o.guicursor = ''
|
||||||
|
|
||||||
-- Indentation
|
-- Indentation
|
||||||
vim.opt.shiftwidth = 2
|
vim.opt.shiftwidth = 2
|
||||||
vim.opt.softtabstop = 2
|
vim.opt.softtabstop = 2
|
||||||
vim.opt.expandtab = true
|
vim.opt.expandtab = true
|
||||||
vim.opt.tabstop = 2
|
vim.opt.tabstop = 2
|
||||||
|
|
||||||
-- Folding
|
-- Folding
|
||||||
vim.o.foldmethod = "indent"
|
vim.o.foldmethod = "indent"
|
||||||
vim.o.foldlevelstart = 99
|
vim.o.foldlevelstart = 99
|
||||||
|
|
||||||
-- Init Snippets
|
-- Init Snippets
|
||||||
vim.g.snipMate = { snippet_version = 1 }
|
vim.g.snipMate = { snippet_version = 1 }
|
||||||
|
|
||||||
-- Load packer.nvim
|
-- Load packer.nvim
|
||||||
local packer_install_path = vim.fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
|
local packer_install_path = vim.fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
|
||||||
if vim.fn.empty(vim.fn.glob(packer_install_path)) > 0 then
|
if vim.fn.empty(vim.fn.glob(packer_install_path)) > 0 then
|
||||||
vim.fn.execute('!git clone https://github.com/wbthomason/packer.nvim ' .. packer_install_path)
|
vim.fn.execute('!git clone https://github.com/wbthomason/packer.nvim ' .. packer_install_path)
|
||||||
vim.cmd 'packadd packer.nvim'
|
vim.cmd 'packadd packer.nvim'
|
||||||
end
|
end
|
||||||
dofile(vim.fn.stdpath('config') .. '/plugins.lua')
|
dofile(vim.fn.stdpath('config') .. '/plugins.lua')
|
||||||
|
|
||||||
-- Treesitter Enable
|
-- Treesitter Enable
|
||||||
require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Load LSP's
|
-- Load LSP's
|
||||||
local function on_attach(client, bufnr)
|
local function on_attach(client, bufnr)
|
||||||
client.server_capabilities.document_formatting = false
|
client.server_capabilities.document_formatting = false
|
||||||
require('lsp_signature').on_attach()
|
require('lsp_signature').on_attach()
|
||||||
local function set_completeopt()
|
local function set_completeopt()
|
||||||
vim.api.nvim_buf_set_option(bufnr, 'completeopt', 'menuone,noselect')
|
vim.api.nvim_buf_set_option(bufnr, 'completeopt', 'menuone,noselect')
|
||||||
end
|
end
|
||||||
set_completeopt()
|
set_completeopt()
|
||||||
end
|
end
|
||||||
|
|
||||||
require('lazy-lsp').setup {
|
require('lazy-lsp').setup {
|
||||||
excluded_servers = {
|
excluded_servers = {
|
||||||
"sqls", "ccls", "zk",
|
"sqls", "ccls", "zk",
|
||||||
},
|
},
|
||||||
|
|
@ -61,8 +61,8 @@
|
||||||
settings = { Lua = { diagnostics = { globals = { "vim" }}}},
|
settings = { Lua = { diagnostics = { globals = { "vim" }}}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- TODO: This is supposed to change the opacity for the LSP in-line error messages but it is not.
|
-- TODO: This is supposed to change the opacity for the LSP in-line error messages but it is not.
|
||||||
vim.cmd('highlight! link LspDiagnosticsVirtualTextError LspDiagnosticsVirtualTextErrorTransparent')
|
vim.cmd('highlight! link LspDiagnosticsVirtualTextError LspDiagnosticsVirtualTextErrorTransparent')
|
||||||
vim.cmd('highlight! LspDiagnosticsVirtualTextErrorTransparent guibg=none gui=none blend=50')
|
vim.cmd('highlight! LspDiagnosticsVirtualTextErrorTransparent guibg=none gui=none blend=50')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue