Compare commits
4 Commits
6af0c10297
...
7b13d73648
Author | SHA1 | Date |
---|---|---|
Ray Elliott | 7b13d73648 | |
Ray Elliott | a022178884 | |
Ray Elliott | d389e1fed1 | |
Ray Elliott | ca70b402c4 |
|
@ -0,0 +1,18 @@
|
|||
(id_selector (id_name) @CssIdentifier)
|
||||
(id_selector (id_name)) @CssIdSelector
|
||||
(tag_name) @HtmlTagName
|
||||
|
||||
(class_selector (class_name) @CssClassName)
|
||||
(selectors (pseudo_class_selector (class_name) @cssPseudoClass))
|
||||
(nesting_selector) @cssNestingSelector
|
||||
|
||||
; need to find out how to make this more specific?
|
||||
(universal_selector) @CssUniversalSelector
|
||||
|
||||
((property_name) (_)) @CssProp
|
||||
|
||||
(unit) @CssUnit
|
||||
|
||||
(declaration (property_name) (_) @CssPropertyValue)
|
||||
|
||||
(media_statement (feature_query (feature_name) @cssMediaFeatureName (_ (unit) @cssMediaQueryValueUnit) @cssMediaQueryValue) @cssMediaQuery)
|
|
@ -0,0 +1,17 @@
|
|||
(start_tag
|
||||
(attribute
|
||||
(attribute_name) @ClassNameAttribute (#eq? @ClassNameAttribute "class")
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @CssClassName )))
|
||||
|
||||
(start_tag
|
||||
(attribute
|
||||
(attribute_name) @IdAttribute (#eq? @IdAttribute "id")
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @CssIdentifier )))
|
||||
|
||||
(start_tag
|
||||
(attribute
|
||||
(attribute_name) @DataAttribute (#match? @DataAttribute "^data-")
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @DataAttributeValue )))
|
|
@ -0,0 +1,27 @@
|
|||
" SpacesToTabs {{{
|
||||
" TODO - ake a proper regex substitution
|
||||
function! s:spacestotabs()
|
||||
%s/^ / /e
|
||||
%s/^ / /e
|
||||
%s/^ / /e
|
||||
%s/^ / /e
|
||||
%s/^ / /e
|
||||
%s/^ / /e
|
||||
endfunction
|
||||
command SpacesToTabs call s:spacestotabs()
|
||||
|
||||
|
||||
"}}}
|
||||
" TrimWhitespace {{{
|
||||
command! -range=% TrimWhitespace let b:wv = winsaveview() |
|
||||
\ keeppattern <line1>,<line2>s/\s\+$// |
|
||||
\ call winrestview(b:wv)
|
||||
|
||||
|
||||
"}}}
|
||||
" Scratch, ScratchVertical {{{
|
||||
command! Scratch new | setlocal buftype=nofile | setlocal bufhidden=hide | setlocal noswapfile
|
||||
command! ScratchVertical vnew | setlocal buftype=nofile | setlocal bufhidden=hide | setlocal noswapfile
|
||||
"}}}
|
||||
"
|
||||
"
|
12
init.vim
12
init.vim
|
@ -8,6 +8,7 @@ source ~/.config/nvim/init.plugins.vim
|
|||
source ~/.config/nvim/init.tabline.vim
|
||||
source ~/.config/nvim/init.auto-window.vim
|
||||
source ~/.config/nvim/init.fold-text.vim
|
||||
source ~/.config/nvim/init.commands.vim
|
||||
|
||||
" TODO - maybe separate some of these into own files too
|
||||
" #functions {{{
|
||||
|
@ -180,17 +181,6 @@ function! ToggleHighlights() abort "{{{
|
|||
endfunction
|
||||
"}}}
|
||||
"----------------------------------------------------------------------------}}}
|
||||
"#commands{{{
|
||||
" TrimWhitespace{{{
|
||||
command! -range=% TrimWhitespace let b:wv = winsaveview() |
|
||||
\ keeppattern <line1>,<line2>s/\s\+$// |
|
||||
\ call winrestview(b:wv)
|
||||
"}}}
|
||||
" Scratch, ScratchVertical{{{
|
||||
command! Scratch new | setlocal buftype=nofile | setlocal bufhidden=hide | setlocal noswapfile
|
||||
command! ScratchVertical vnew | setlocal buftype=nofile | setlocal bufhidden=hide | setlocal noswapfile
|
||||
"}}}
|
||||
"}}}
|
||||
" #settings {{{
|
||||
|
||||
scriptencoding utf-8
|
||||
|
|
|
@ -130,18 +130,18 @@ local on_attach = function(client, bufnr)
|
|||
buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
||||
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>l', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||
-- buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
||||
-- buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
||||
-- buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
||||
buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
||||
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
||||
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue