refactor it all
This commit is contained in:
parent
ff529b4d12
commit
0fbbc616de
7 changed files with 4 additions and 94 deletions
|
@ -11,3 +11,6 @@ indent_style = tab
|
|||
|
||||
[*.{yaml,yml}]
|
||||
indent_size = 2
|
||||
|
||||
[*.{html}]
|
||||
indent_size = 2
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"suggest.autoTrigger": "none",
|
||||
"signature.target": "echo",
|
||||
"rust-analyzer.diagnostics.disabled": ["unresolved-proc-macro"],
|
||||
"rust-analyzer.updates.checkOnStartup": false,
|
||||
"rust-analyzer.inlayHints.chainingHints.enable": true,
|
||||
"rust-analyzer.inlayHints.closingBraceHints.enable": false,
|
||||
"rust-analyzer.inlayHints.closingBraceHints.minLines": 1,
|
||||
"rust-analyzer.inlayHints.lifetimeElisionHints.enable": true,
|
||||
"rust-analyzer.inlayHints.lifetimeElisionHints.useParameterNames": true
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
augroup CoqtailHighlights
|
||||
autocmd!
|
||||
autocmd ColorScheme *
|
||||
\ hi def CoqtailChecked ctermbg=236 guibg=LightGray
|
||||
\| hi def CoqtailSent ctermbg=237 guibg=DarkGray
|
||||
augroup END
|
|
@ -1,12 +1,9 @@
|
|||
let $FZF_DEFAULT_COMMAND='rg --files --follow --hidden -g "!{node_modules/*,.git/*,.styles/*}"'
|
||||
|
||||
" source $HOME/.config/nvim/coq.vim
|
||||
source $HOME/.config/nvim/plug/plug.vim
|
||||
source $HOME/.config/nvim/plugs.vim
|
||||
source $HOME/.config/nvim/colors/quietly.vim
|
||||
|
||||
"source $HOME/.config/nvim/treesitter.lua
|
||||
"source $HOME/.config/nvim/rust.lua
|
||||
source $HOME/.config/nvim/completion.lua
|
||||
source $HOME/.config/nvim/lsp.lua
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
-- Setup language servers.
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.rust_analyzer.setup({})
|
||||
lspconfig.tailwindcss.setup{}
|
||||
|
||||
-- Global mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
local rt = require("rust-tools")
|
||||
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
rt.setup({
|
||||
server = {
|
||||
on_attach = function(_, bufnr)
|
||||
local bufopts = { noremap=true, silent=true, buffer=bufnr }
|
||||
|
||||
vim.keymap.set('n', '<Leader>e', vim.diagnostic.open_float, opts)
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
||||
vim.keymap.set('n', '<Leader>q', vim.diagnostic.setloclist, opts)
|
||||
|
||||
-- Hover actions
|
||||
vim.keymap.set("n", "<C-k>", rt.hover_actions.hover_actions, bufopts)
|
||||
|
||||
-- generic LSP config
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
||||
vim.keymap.set('n', '<Leader>rn', vim.lsp.buf.rename, bufopts)
|
||||
vim.keymap.set('n', '<Leader>a', vim.lsp.buf.code_action, bufopts)
|
||||
vim.keymap.set('v', '<Leader>a', vim.lsp.buf.code_action, bufopts)
|
||||
vim.keymap.set('n', '<Leader>f', function() vim.lsp.buf.format { async = true } end, bufopts)
|
||||
|
||||
end,
|
||||
capabilities = capabilities,
|
||||
},
|
||||
})
|
||||
rt.inlay_hints.set()
|
||||
rt.inlay_hints.enable()
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
require'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all"
|
||||
ensure_installed = { "markdown", "markdown_inline", "go", "python" },
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
|
||||
-- List of parsers to ignore installing (for "all")
|
||||
ignore_install = { "rust" },
|
||||
|
||||
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
|
||||
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
|
||||
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
|
||||
-- the name of the parser)
|
||||
-- list of language that will be disabled
|
||||
disable = { "rust" },
|
||||
|
||||
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
|
||||
disable = function(lang, buf)
|
||||
local max_filesize = 100 * 1024 -- 100 KB
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
Loading…
Reference in a new issue